function LocaleTranslation::destruct

Same name and namespace in other branches
  1. 9 core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::destruct()
  2. 8.9.x core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::destruct()
  3. 10 core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::destruct()

Overrides DestructableInterface::destruct

File

core/modules/locale/src/LocaleTranslation.php, line 154

Class

LocaleTranslation
String translator using the locale module.

Namespace

Drupal\locale

Code

public function destruct() {
    foreach ($this->translations as $context) {
        foreach ($context as $lookup) {
            if ($lookup instanceof DestructableInterface) {
                $lookup->destruct();
            }
        }
    }
}

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