public function ConfigProviderInstall::addConfigToCreate in Configuration Provider 8.2
Same name and namespace in other branches
- 8 src/Plugin/ConfigProvider/ConfigProviderInstall.php \Drupal\config_provider\Plugin\ConfigProvider\ConfigProviderInstall::addConfigToCreate()
Adds configuration to be installed.
This method is invoked at extension install time. A given configuration provider can add configuration to be installed or alter configuration as provided by a prior extension.
In some cases, installation of configuration may be handled separately, meaning that no configuration need be added here.
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 ConfigProviderInterface::addConfigToCreate
See also
\Drupal\config_provider\ConfigProviderConfigInstaller::getConfigToCreate()
\Drupal\config_provider\Plugin\ConfigProviderInterface\addInstallableConfig()
File
- src/
Plugin/ ConfigProvider/ ConfigProviderInstall.php, line 29
Class
- ConfigProviderInstall
- Class for providing configuration from an install directory.
Namespace
Drupal\config_provider\Plugin\ConfigProviderCode
public function addConfigToCreate(array &$config_to_create, StorageInterface $storage, $collection, $prefix = '', array $profile_storages = []) {
// The caller will aready have loaded config for install.
}