You are here

public function ConfigOverrider::createConfigObject in Drupal 9

Same name in this branch
  1. 9 core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php \Drupal\config_entity_static_cache_test\ConfigOverrider::createConfigObject()
  2. 9 core/modules/config/tests/config_override_test/src/ConfigOverrider.php \Drupal\config_override_test\ConfigOverrider::createConfigObject()
  3. 9 core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php \Drupal\settings_tray_override_test\ConfigOverrider::createConfigObject()
Same name and namespace in other branches
  1. 8 core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php \Drupal\settings_tray_override_test\ConfigOverrider::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.

Overrides ConfigFactoryOverrideInterface::createConfigObject

See also

\Drupal\Core\Config\ConfigCollectionInfo

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

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

File

core/modules/settings_tray/tests/modules/settings_tray_override_test/src/ConfigOverrider.php, line 49

Class

ConfigOverrider
Provides an overridden block for Settings Tray testing.

Namespace

Drupal\settings_tray_override_test

Code

public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
  return NULL;
}