if ($this->moduleHandler->
isLoaded()) { $this->cache->
set("theme_registry:build:modules",
$cache, Cache::PERMANENT,
['theme_registry'
]);
} } // Process each base theme.
// Ensure that we start with the root of the parents, so that both CSS files
// and preprocess functions comes first.
foreach (array_reverse($this->theme->
getBaseThemeExtensions()) as $base) { // If the base theme uses a theme engine, process its hooks.
$base_path =
$base->
getPath();
if ($this->theme->
getEngine()) { $this->
processExtension($cache,
$this->theme->
getEngine(), 'base_theme_engine',
$base->
getName(),
$base_path);
} $this->
processExtension($cache,
$base->
getName(), 'base_theme',
$base->
getName(),
$base_path);
} // And then the same thing, but for the theme.
if ($this->theme->
getEngine()) { $this->
processExtension($cache,
$this->theme->
getEngine(), 'theme_engine',
$this->theme->
getName(),
$this->theme->
getPath());
} // Hooks provided by the theme itself.