// configuration entity imports. We only need to ensure that simple
// configuration is created when the extension is installed.
$storage =
$this->
getSourceStorage();
$prefix =
$name . '.';
} // Gets profile storages to search for overrides if necessary.
$profile_storages =
$this->
getProfileStorages($name);
// Gather information about all the supported collections.
$collection_info =
$this->configManager->
getConfigCollectionInfo();
foreach ($collection_info->
getCollectionNames() as $collection) { $config_to_create =
$this->
getConfigToCreate($storage,
$collection,
$prefix,
$profile_storages);
if ($name ==
$this->
drupalGetProfile()) { // If we're installing a profile ensure simple configuration that
// already exists is excluded as it will have already been written.
// This means that if the configuration is changed by something else
// during the install it will not be overwritten again.
$existing_configuration =
array_filter($this->
getActiveStorages($collection)->
listAll(),
function D
$config_name) { return !
$this->configManager->
getEntityTypeIdByName($config_name);
});
$config_to_create =
array_diff_key($config_to_create,
array_flip($existing_configuration));
}