On this page
protected function InstallStorage::getAllFolders
protected InstallStorage::getAllFolders()
Returns a map of all config object names and their folders.
Return value
array An array mapping config object names with directories.
File
- core/lib/Drupal/Core/Config/InstallStorage.php, line 151
Class
- InstallStorage
- Storage used by the Drupal installer.
Namespace
Drupal\Core\ConfigCode
protected function getAllFolders() {
if (!isset($this->folders)) {
$this->folders = array();
$this->folders += $this->getCoreNames();
// Perform an ExtensionDiscovery scan as we cannot use drupal_get_path()
// yet because the system module may not yet be enabled during install.
// @todo Remove as part of https://www.drupal.org/node/2186491
$listing = new ExtensionDiscovery(\Drupal::root());
if ($profile = drupal_get_profile()) {
$profile_list = $listing->scan('profile');
if (isset($profile_list[$profile])) {
// Prime the drupal_get_filename() static cache with the profile info
// file location so we can use drupal_get_path() on the active profile
// during the module scan.
// @todo Remove as part of https://www.drupal.org/node/2186491
drupal_get_filename('profile', $profile, $profile_list[$profile]->getPathname());
$this->folders += $this->getComponentNames(array($profile_list[$profile]));
}
}
// @todo Remove as part of https://www.drupal.org/node/2186491
$this->folders += $this->getComponentNames($listing->scan('module'));
$this->folders += $this->getComponentNames($listing->scan('theme'));
}
return $this->folders;
}
© 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!Config!InstallStorage.php/function/InstallStorage::getAllFolders/8.1.x