$sub_themes[] =
$name;
} // Add status.
$theme->status =
(int) isset($this->installedThemes
[$name]);
} // Build dependencies.
$themes =
$this->moduleHandler->
buildModuleDependencies($themes);
// After establishing the full list of available themes, fill in data for
// sub-themes.
$this->
fillInSubThemeData($themes,
$sub_themes);
foreach ($themes as $theme) { // After $theme is processed by buildModuleDependencies(), there can be a
// `$theme->requires` array containing both module and base theme
// dependencies. The module dependencies are copied to their own property
// so they are available to operations specific to module dependencies.
if (isset($theme->requires
)) { $theme->module_dependencies =
array_diff_key($theme->requires,
$themes);
} else { // Even if no requirements are specified, the theme installation process