You are here

public function ConfigProviderInterface::addConfigToCreate in Configuration Provider 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/ConfigProviderInterface.php \Drupal\config_provider\Plugin\ConfigProviderInterface::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.

See also

\Drupal\config_provider\ConfigProviderConfigInstaller::getConfigToCreate()

\Drupal\config_provider\Plugin\ConfigProviderInterface\addInstallableConfig()

3 methods override ConfigProviderInterface::addConfigToCreate()
ConfigProviderInstall::addConfigToCreate in src/Plugin/ConfigProvider/ConfigProviderInstall.php
Adds configuration to be installed.
ConfigProviderOptional::addConfigToCreate in src/Plugin/ConfigProvider/ConfigProviderOptional.php
Adds configuration to be installed.
Foo::addConfigToCreate in tests/modules/config_provider_multi_providers_test/src/Plugin/ConfigProvider/Foo.php
Adds configuration to be installed.

File

src/Plugin/ConfigProviderInterface.php, line 95

Class

ConfigProviderInterface
Defines an interface for Configuration provider plugins.

Namespace

Drupal\config_provider\Plugin

Code

public function addConfigToCreate(array &$config_to_create, StorageInterface $storage, $collection, $prefix = '', array $profile_storages = []);