function ConfigurableLanguage::preSave

Same name in other branches
  1. 8.9.x core/modules/language/src/Entity/ConfigurableLanguage.php \Drupal\language\Entity\ConfigurableLanguage::preSave()
  2. 10 core/modules/language/src/Entity/ConfigurableLanguage.php \Drupal\language\Entity\ConfigurableLanguage::preSave()
  3. 11.x core/modules/language/src/Entity/ConfigurableLanguage.php \Drupal\language\Entity\ConfigurableLanguage::preSave()

Overrides ConfigEntityBase::preSave

File

core/modules/language/src/Entity/ConfigurableLanguage.php, line 123

Class

ConfigurableLanguage
Defines the ConfigurableLanguage entity.

Namespace

Drupal\language\Entity

Code

public function preSave(EntityStorageInterface $storage) {
    parent::preSave($storage);
    // Store whether or not the site is already multilingual so that we can
    // rebuild services if necessary during
    // \Drupal\language\Entity\ConfigurableLanguage::postSave().
    $this->preSaveMultilingual = \Drupal::languageManager()->isMultilingual();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.