W3cubDocs

/Drupal 8

public function ConfigFactoryOverrideInterface::createConfigObject

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

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()

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);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!ConfigFactoryOverrideInterface.php/function/ConfigFactoryOverrideInterface::createConfigObject/8.1.x