PluralVariants::setConfig

public PluralVariants::setConfig(Config $base_config, LanguageConfigOverride $config_translation, $config_values, $base_key = NULL)

Sets configuration based on a nested form value array.

If the configuration values are the same as the source configuration, the override should be removed from the translation configuration.

Parameters

\Drupal\Core\Config\Config $base_config: Base configuration values, in the source language.

\Drupal\language\Config\LanguageConfigOverride $config_translation: Translation configuration override data.

mixed $config_values: The configuration value of the element taken from the form values.

string|null $base_key: (optional) The base key that the schema and the configuration values belong to. This should be NULL for the top-level configuration object and be populated consecutively when recursing into the configuration structure.

Overrides FormElementBase::setConfig

File

core/modules/config_translation/src/FormElement/PluralVariants.php, line 74

Class

PluralVariants
Defines form elements for plurals in configuration translation.

Namespace

Drupal\config_translation\FormElement

Code

public function setConfig(Config $base_config, LanguageConfigOverride $config_translation, $config_values, $base_key = NULL) {
  $config_values = implode(LOCALE_PLURAL_DELIMITER, $config_values);
  parent::setConfig($base_config, $config_translation, $config_values, $base_key);
}
doc_Drupal
2016-10-29 09:34:21
Comments
Leave a Comment

Please login to continue.