You are here

function toolbar_themes_get_theme_definition in Toolbar Themes 8

Return a themes definitions.

Return value

array

2 calls to toolbar_themes_get_theme_definition()
toolbar_themes_preprocess_toolbar_themes__toolbar in ./toolbar_themes.module
Implements hook_preprocess_HOOK().
toolbar_themes_theme_registry_alter in ./toolbar_themes.module
Implements hook_theme_registry_alter(). ...well this seems repetitive. TODO, abstract something or?

File

./toolbar_themes.module, line 47

Code

function toolbar_themes_get_theme_definition($theme) {
  $theme_definition = [];
  $definitions = toolbar_themes_get_theme_definitions();
  foreach ($definitions as $provider => $provider_themes) {
    foreach ($provider_themes as $theme_key => $theme_values) {
      if ($theme == $theme_key) {
        $theme_values['provider'] = $provider;
        $theme_definition = $theme_values;
      }
    }
  }
  return $theme_definition;
}