You are here

public function LocaleTranslation::destruct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/src/LocaleTranslation.php \Drupal\locale\LocaleTranslation::destruct()

Performs destruct operations.

Overrides DestructableInterface::destruct

File

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

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();
      }
    }
  }
}