public function Registry::reset

public Registry::reset()

Invalidates theme registry caches.

To be called when the list of enabled extensions is changed.

File

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

Class

Registry
Defines the theme registry service.

Namespace

Drupal\Core\Theme

Code

public function reset() {
  // Reset the runtime registry.
  foreach ($this->runtimeRegistry as $runtime_registry) {
    $runtime_registry->clear();
  }
  $this->runtimeRegistry = [];

  $this->registry = [];
  Cache::invalidateTags(array('theme_registry'));
  return $this;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Theme!Registry.php/function/Registry::reset/8.1.x