// should be created.
$list =
array_filter($list,
function D
$config_name) use ($existing_config) { // Only list configuration that:
// - does not already exist
// - is a configuration entity (this also excludes config that has an
// implicit dependency on modules that are not yet installed)
return !
in_array($config_name,
$existing_config) &&
$this->configManager->
getEntityTypeIdByName($config_name);
});
$all_config =
array_merge($existing_config,
$list);
$all_config =
array_combine($all_config,
$all_config);
$config_to_create =
$storage->
readMultiple($list);
// Check to see if the corresponding override storage has any overrides or
// new configuration that can be installed.
if ($profile_storage) { $config_to_create =
$profile_storage->
readMultiple($list) +
$config_to_create;
} // Sort $config_to_create in the order of the least dependent first.
$dependency_manager =
new ConfigDependencyManager();
$dependency_manager->
setData($config_to_create);
$config_to_create =
array_merge(array_flip($dependency_manager->
sortAll()),
$config_to_create);
if (!
empty($dependency)) { // In order to work out dependencies we need the full config graph.