public Registry::get()
Returns the complete theme registry from cache or rebuilds it.
array The complete theme registry data array.
Registry::$registry
public function get() { $this->init($this->themeName); if (isset($this->registry[$this->theme->getName()])) { return $this->registry[$this->theme->getName()]; } if ($cache = $this->cache->get('theme_registry:' . $this->theme->getName())) { $this->registry[$this->theme->getName()] = $cache->data; } else { $this->build(); // Only persist it if all modules are loaded to ensure it is complete. if ($this->moduleHandler->isLoaded()) { $this->setCache(); } } return $this->registry[$this->theme->getName()]; }
© 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::get/8.1.x