diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php index ace69e9..c02a132 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -119,7 +119,7 @@ public function installDefaultConfig($type, $name) { $enabled_extensions[] = 'core'; foreach ($collection_info->getCollectionNames(TRUE) as $collection) { - $config_to_install = $this->listDefaultConfigCollection($collection, $type, $name, $enabled_extensions); + $config_to_install = $this->listDefaultConfigToInstall($type, $name, $collection, $enabled_extensions); if (!empty($config_to_install)) { $this->createConfiguration($collection, $config_to_install); } @@ -130,21 +130,25 @@ public function installDefaultConfig($type, $name) { } /** - * Installs default configuration for a particular collection. + * Lists default configuration for an extension that is available to install. + * + * This looks in the extension's config/install directory and all of the + * currently enabled extensions config/install directories for configuration + * that begins with the extension's name. * - * @param string $collection - * The configuration collection to install. * @param string $type * The extension type; e.g., 'module' or 'theme'. * @param string $name * The name of the module or theme to install default configuration for. + * @param string $collection + * The configuration collection to install. * @param array $enabled_extensions * A list of all the currently enabled modules and themes. * * @return array * The list of configuration objects to create. */ - protected function listDefaultConfigCollection($collection, $type, $name, array $enabled_extensions) { + protected function listDefaultConfigToInstall($type, $name, $collection, array $enabled_extensions) { // Get all default configuration owned by this extension. $source_storage = $this->getSourceStorage($collection); $config_to_install = $source_storage->listAll($name . '.'); @@ -347,7 +351,7 @@ public function findPreExistingConfiguration($type, $name) { // Add the extension that will be enabled to the list of enabled extensions. $enabled_extensions[] = $name; foreach ($collection_info->getCollectionNames(TRUE) as $collection) { - $config_to_install = $this->listDefaultConfigCollection($collection, $type, $name, $enabled_extensions); + $config_to_install = $this->listDefaultConfigToInstall($type, $name, $collection, $enabled_extensions); $active_storage = $this->getActiveStorages($collection); foreach ($config_to_install as $config_name) { if ($active_storage->exists($config_name)) {