protected function Registry8b7c:f320:99b9:690f:4595:cd17:293a:c069init protected Registry8b7c:f320:99b9:690f:4595:cd17:293a:c069init($theme_name = NULL) Initializes a theme with a certain name. This function does to much magic, so it should be replaced by another services which holds the current active theme information. Parameters  string $theme_name: (optional) The name of the theme for which to construct the registry. File
 core/lib/Drupal/Core/Theme/Registry.php, line 190  Class
 
Registry  Defines the theme registry service.  Namespace Drupal\Core\Theme Code protected function init($theme_name = NULL) {
  if ($this->initialized) {
    return;
  }
  // Unless instantiated for a specific theme, use globals.
  if (!isset($theme_name)) {
    $this->theme = $this->themeManager->getActiveTheme();
  }
  // Instead of the active theme, a specific theme was requested.
  else {
    $this->theme = $this->themeInitialization->getActiveThemeByName($theme_name);
    $this->themeInitialization->loadActiveTheme($this->theme);
  }
}


    
{'path': 'public/docs/drupal~8/core-lib-drupal-core-theme-registry.php/function/registry-init/8.1.x.html', 'source': 'DevDocs.IO'}