function Registry::destruct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::destruct()
  2. 10 core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::destruct()
  3. 9 core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::destruct()
  4. 8.9.x core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::destruct()

Performs destruct operations.

Overrides DestructableInterface::destruct

File

core/lib/Drupal/Core/Theme/Registry.php, line 772

Class

Registry
Defines the theme registry service.

Namespace

Drupal\Core\Theme

Code

public function destruct() {
  // Release the registries so later requests get fresh runtime collectors.
  $runtime_registries = $this->runtimeRegistry;
  $this->runtimeRegistry = [];
  foreach ($runtime_registries as $runtime_registry) {
    $runtime_registry->destruct();
  }
}

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