ThemeInitialization::initTheme
public function ThemeInitialization::initTheme
public ThemeInitialization::initTheme($theme_name)
Initializes a given theme.
This loads the active theme, for example include its engine file.
Parameters
string $theme_name: The machine name of the theme.
Return value
\Drupal\Core\Theme\ActiveTheme An active theme object instance for the given theme.
Overrides ThemeInitializationInterface::initTheme
File
- core/lib/Drupal/Core/Theme/ThemeInitialization.php, line 65
Class
- ThemeInitialization
- Provides the theme initialization logic.
Namespace
Drupal\Core\ThemeCode
public function initTheme($theme_name) { $active_theme = $this->getActiveThemeByName($theme_name); $this->loadActiveTheme($active_theme); return $active_theme; }
© 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!ThemeInitialization.php/function/ThemeInitialization::initTheme/8.1.x