public function ExtensionDiscovery::setProfileDirectoriesFromSettings
public ExtensionDiscovery::setProfileDirectoriesFromSettings()
Sets installation profile directories based on current site settings.
Return value
$this
File
- core/lib/Drupal/Core/Extension/ExtensionDiscovery.php, line 236
Class
- ExtensionDiscovery
- Discovers available extensions in the filesystem.
Namespace
Drupal\Core\ExtensionCode
public function setProfileDirectoriesFromSettings() { $this->profileDirectories = array(); $profile = drupal_get_profile(); // For SimpleTest to be able to test modules packaged together with a // distribution we need to include the profile of the parent site (in // which test runs are triggered). if (drupal_valid_test_ua() && !drupal_installation_attempted()) { $testing_profile = \Drupal::config('simpletest.settings')->get('parent_profile'); if ($testing_profile && $testing_profile != $profile) { $this->profileDirectories[] = drupal_get_path('profile', $testing_profile); } } // In case both profile directories contain the same extension, the actual // profile always has precedence. if ($profile) { $this->profileDirectories[] = drupal_get_path('profile', $profile); } return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Extension!ExtensionDiscovery.php/function/ExtensionDiscovery::setProfileDirectoriesFromSettings/8.1.x