protected function fillInSubThemeData(array &
$themes, array
$sub_themes) { foreach ($sub_themes as $name) { $sub_theme =
$themes[$name];
// The $base_themes property is optional; only set for sub themes.
// @see ThemeHandlerInterface::listInfo()
$sub_theme->base_themes =
$this->
doGetBaseThemes($themes,
$name);
// empty() cannot be used here, since static::doGetBaseThemes() adds
// the key of a base theme with a value of NULL in case it is not found,
// in order to prevent needless iterations.
if (!
current($sub_theme->base_themes
)) { continue;
} // Determine the root base theme.
$root_key =
key($sub_theme->base_themes
);
// Build the list of sub-themes for each of the theme's base themes.
foreach (array_keys($sub_theme->base_themes
) as $base_theme) { $themes[$base_theme]->sub_themes
[$name] =
$sub_theme->info
['name'
];
}