ConfigurableLanguageManager::saveLanguageTypesConfiguration

public ConfigurableLanguageManager::saveLanguageTypesConfiguration(array $values)

Stores language types configuration.

Parameters

array $config: An indexed array with the following keys_

  • configurable: an array of configurable language type names.
  • all: an array of all the defined language type names.

Overrides ConfigurableLanguageManagerInterface::saveLanguageTypesConfiguration

File

core/modules/language/src/ConfigurableLanguageManager.php, line 196

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function saveLanguageTypesConfiguration(array $values) {
  $config = $this->configFactory->getEditable('language.types');
  if (isset($values['configurable'])) {
    $config->set('configurable', $values['configurable']);
  }
  if (isset($values['all'])) {
    $config->set('all', $values['all']);
  }
  $config->save();
}
doc_Drupal
2016-10-29 08:55:18
Comments
Leave a Comment

Please login to continue.