function ConfigFactoryOverrideInterface::createConfigObject

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/ConfigFactoryOverrideInterface.php \Drupal\Core\Config\ConfigFactoryOverrideInterface::createConfigObject()
  2. 10 core/lib/Drupal/Core/Config/ConfigFactoryOverrideInterface.php \Drupal\Core\Config\ConfigFactoryOverrideInterface::createConfigObject()
  3. 11.x core/lib/Drupal/Core/Config/ConfigFactoryOverrideInterface.php \Drupal\Core\Config\ConfigFactoryOverrideInterface::createConfigObject()

Creates a configuration object for use during install and synchronization.

If the overrider stores its overrides in configuration collections then it can have its own implementation of \Drupal\Core\Config\StorableConfigBase. Configuration overriders can link themselves to a configuration collection by listening to the \Drupal\Core\Config\ConfigEvents::COLLECTION_INFO event and adding the collections they are responsible for. Doing this will allow installation and synchronization to use the overrider's implementation of StorableConfigBase.

Parameters

string $name: The configuration object name.

string $collection: The configuration collection.

Return value

\Drupal\Core\Config\StorableConfigBase The configuration object for the provided name and collection.

See also

\Drupal\Core\Config\ConfigCollectionInfo

\Drupal\Core\Config\ConfigImporter::importConfig()

\Drupal\Core\Config\ConfigInstaller::createConfiguration()

8 methods override ConfigFactoryOverrideInterface::createConfigObject()
CacheabilityMetadataConfigOverride::createConfigObject in core/modules/config/tests/config_override_integration_test/src/CacheabilityMetadataConfigOverride.php
Creates a configuration object for use during install and synchronization.
ConfigOverride::createConfigObject in core/lib/Drupal/Core/Installer/ConfigOverride.php
Creates a configuration object for use during install and synchronization.
ConfigOverrider::createConfigObject in core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php
Creates a configuration object for use during install and synchronization.
ConfigOverrider::createConfigObject in core/modules/config/tests/config_override_test/src/ConfigOverrider.php
Creates a configuration object for use during install and synchronization.
ConfigOverrider::createConfigObject in core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php
Creates a configuration object for use during install and synchronization.

... See full list

File

core/lib/Drupal/Core/Config/ConfigFactoryOverrideInterface.php, line 54

Class

ConfigFactoryOverrideInterface
Defines the interface for a configuration factory override object.

Namespace

Drupal\Core\Config

Code

public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.