interface LanguageConfigFactoryOverrideInterface implements ConfigFactoryOverrideInterface (View source)

Defines the interface for a configuration factory language override object.

Methods

array
loadOverrides(array $names)

Returns config overrides.

string
getCacheSuffix()

The string to append to the configuration static cache name.

createConfigObject(string $name, string $collection = StorageInterface::DEFAULT_COLLECTION)

Creates a configuration object for use during install and synchronization.

getCacheableMetadata(string $name)

Gets the cacheability metadata associated with the config factory override.

getLanguage()

Gets the language object used to override configuration data.

$this
setLanguage(LanguageInterface $language = NULL)

Sets the language to be used in configuration overrides.

getOverride(string $langcode, string $name)

Get language override for given language and configuration name.

getStorage(string $langcode)

Returns the storage instance for a particular langcode.

installLanguageOverrides(string $langcode)

Installs available language configuration overrides for a given langcode.

Details

array loadOverrides(array $names)

Returns config overrides.

Parameters

array $names

A list of configuration names that are being loaded.

Return Value

array

An array keyed by configuration name of override data. Override data contains a nested array structure of overrides.

string getCacheSuffix()

The string to append to the configuration static cache name.

Return Value

string

A string to append to the configuration static cache name.

StorableConfigBase createConfigObject(string $name, string $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

StorableConfigBase

The configuration object for the provided name and collection.

See also

ConfigCollectionInfo
ConfigImporter::importConfig
ConfigInstaller::createConfiguration

CacheableMetadata getCacheableMetadata(string $name)

Gets the cacheability metadata associated with the config factory override.

Parameters

string $name

The name of the configuration override to get metadata for.

Return Value

CacheableMetadata

A cacheable metadata object.

LanguageInterface getLanguage()

Gets the language object used to override configuration data.

Return Value

LanguageInterface

The language object used to override configuration data.

$this setLanguage(LanguageInterface $language = NULL)

Sets the language to be used in configuration overrides.

Parameters

LanguageInterface $language

The language object used to override configuration data.

Return Value

$this

Config getOverride(string $langcode, string $name)

Get language override for given language and configuration name.

Parameters

string $langcode

Language code.

string $name

Configuration name.

Return Value

Config

Configuration override object.

StorageInterface getStorage(string $langcode)

Returns the storage instance for a particular langcode.

Parameters

string $langcode

Language code.

Return Value

StorageInterface

The storage instance for a particular langcode.

installLanguageOverrides(string $langcode)

Installs available language configuration overrides for a given langcode.

Parameters

string $langcode

Language code.