You are here

public function Foo::addInstallableConfig in Configuration Provider 8.2

Adds configuration that is available to be installed or updated.

Not intended to be called an install time, this method instead facilitates determining what configuration updates are available.

Implementing plugins should write configuration as appropriate to the ::providerStorage storage.

Parameters

\Drupal\Core\Extension\Extension[] $extensions: (Optional) An associative array of Extension objects, keyed by extension name. If provided, data loaded will be limited to these extensions.

Overrides ConfigProviderInterface::addInstallableConfig

See also

\Drupal\config_provider\Plugin\ConfigProviderInterface\addConfigToCreate()

File

tests/modules/config_provider_multi_providers_test/src/Plugin/ConfigProvider/Foo.php, line 36

Class

Foo
Class for providing configuration from an 'foo' directory.

Namespace

Drupal\config_provider_foo_provider_test\Plugin\ConfigProvider

Code

public function addInstallableConfig(array $extensions = []) {
  foreach ($this
    ->getFooConfig($extensions) as $name => $value) {
    $this->providerStorage
      ->write($name, $value);
  }
}