protected function ConfigProviderConfigInstaller::getConfigToCreate in Configuration Provider 8
Same name and namespace in other branches
- 8.2 src/ConfigProviderConfigInstaller.php \Drupal\config_provider\ConfigProviderConfigInstaller::getConfigToCreate()
Overrides \Drupal\Core\Config\ConfigInstaller::getConfigToCreate().
When extensions are installed, consult all registered config providers.
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.
Overrides ConfigInstaller::getConfigToCreate
File
- src/
ConfigProviderConfigInstaller.php, line 30
Class
Namespace
Drupal\config_providerCode
protected function getConfigToCreate(StorageInterface $storage, $collection, $prefix = '', array $profile_storages = []) {
// Determine if we have configuration to create.
$config_to_create = parent::getConfigToCreate($storage, $collection, $prefix, $profile_storages);
/* @var \Drupal\config_provider\Plugin\ConfigCollectorInterface $config_collector */
$config_collector = \Drupal::service('config_provider.collector');
foreach ($config_collector
->getConfigProviders() as $config_provider) {
$config_provider
->addConfigToCreate($config_to_create, $storage, $collection, $prefix, $profile_storages);
}
return $config_to_create;
}