diff --git a/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php index 7801569..39f4348 100644 --- a/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php +++ b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php @@ -28,13 +28,13 @@ class ExtensionInstallStorage extends InstallStorage { * @param \Drupal\Core\Config\StorageInterface $config_storage * The active configuration store where the list of enabled modules and * themes is stored. - * @param string $folder_to_scan + * @param string $collection * The folder to scan in each extension to scan for files. Defaults to * 'config'. */ - public function __construct(StorageInterface $config_storage, $folder_to_scan = 'config') { + public function __construct(StorageInterface $config_storage, $collection = 'config') { $this->configStorage = $config_storage; - $this->folderToScan = $folder_to_scan; + $this->collection = $collection; } /** diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index dbba5cb..da9e57d 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -34,17 +34,17 @@ class InstallStorage extends FileStorage { * * @var string */ - protected $folderToScan; + protected $collection; /** * Overrides Drupal\Core\Config\FileStorage::__construct(). * - * @param string $folder_to_scan + * @param string $collection * The folder to scan in each extension to scan for files. Defaults to * 'config'. */ - public function __construct($folder_to_scan = 'config') { - $this->folderToScan = $folder_to_scan; + public function __construct($collection = 'config') { + $this->collection = $collection; } /** @@ -151,24 +151,6 @@ protected function getAllFolders() { } /** - * Gets all configuration supplied by core. - * - * @return array - * Array containing items indexed by name with a value of the core directory - * that supplies it. - */ - protected function getCoreComponents() { - $extension = '.' . $this->getFileExtension(); - $folders = array(); - $directory = DRUPAL_ROOT . '/core/' . $this->folderToScan; - $files = new \GlobIterator($directory . '/*' . $extension); - foreach ($files as $file) { - $folders[$file->getBasename($extension)] = $directory; - } - return $folders; - } - - /** * Get all configuration names and folders for a list of modules or themes. * * @param string $type @@ -206,7 +188,7 @@ public function getComponentNames($type, array $list) { * The configuration folder name for this component. */ protected function getComponentFolder($type, $name) { - return drupal_get_path($type, $name) . '/' . $this->folderToScan; + return drupal_get_path($type, $name) . '/' . $this->collection; } /** diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index 30e2c58..011be4d 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -182,6 +182,7 @@ public function getDefinitions() { $this->definitions = $cache->data; } else { + $this->definitions = array(); foreach ($this->schemaStorage->readMultiple($this->schemaStorage->listAll()) as $schema) { foreach ($schema as $type => $definition) { $this->definitions[$type] = $definition;