protected function ConfigInstaller::getConfigToCreate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Config/ConfigInstaller.php \Drupal\Core\Config\ConfigInstaller::getConfigToCreate()
Gets configuration data from the provided storage to create.
Parameters
StorageInterface $storage: The configuration storage to read configuration from.
string $collection: The configuration collection to use.
string $prefix: (optional) Limit to configuration starting with the provided string.
\Drupal\Core\Config\StorageInterface[] $profile_storages: An array of storage interfaces containing profile configuration to check for overrides.
Return value
array An array of configuration data read from the source storage keyed by the configuration object name.
3 calls to ConfigInstaller::getConfigToCreate()
- ConfigInstaller::findDefaultConfigWithUnmetDependencies in core/
lib/ Drupal/ Core/ Config/ ConfigInstaller.php - Finds default configuration with unmet dependencies.
- ConfigInstaller::findPreExistingConfiguration in core/
lib/ Drupal/ Core/ Config/ ConfigInstaller.php - Finds pre-existing configuration objects for the provided extension.
- ConfigInstaller::installDefaultConfig in core/
lib/ Drupal/ Core/ Config/ ConfigInstaller.php - Installs the default configuration of a given extension.
File
- core/
lib/ Drupal/ Core/ Config/ ConfigInstaller.php, line 234 - Contains \Drupal\Core\Config\ConfigInstaller.
Class
Namespace
Drupal\Core\ConfigCode
protected function getConfigToCreate(StorageInterface $storage, $collection, $prefix = '', array $profile_storages = []) {
if ($storage
->getCollectionName() != $collection) {
$storage = $storage
->createCollection($collection);
}
$data = $storage
->readMultiple($storage
->listAll($prefix));
// Check to see if the corresponding override storage has any overrides.
foreach ($profile_storages as $profile_storage) {
if ($profile_storage
->getCollectionName() != $collection) {
$profile_storage = $profile_storage
->createCollection($collection);
}
$data = $profile_storage
->readMultiple(array_keys($data)) + $data;
}
return $data;
}