You are here

function theme_styleswitcher_admin_style_overview in Style Switcher 8.2

Same name and namespace in other branches
  1. 6.2 styleswitcher.admin.inc \theme_styleswitcher_admin_style_overview()
  2. 7.2 styleswitcher.admin.inc \theme_styleswitcher_admin_style_overview()
  3. 3.0.x styleswitcher.module \theme_styleswitcher_admin_style_overview()

Returns HTML for a style description on the styles overview page.

Parameters

array $variables: An associative array containing:

See also

styleswitcher_style_load()

1 string reference to 'theme_styleswitcher_admin_style_overview'
styleswitcher_theme in ./styleswitcher.module
Implements hook_theme().
2 theme calls to theme_styleswitcher_admin_style_overview()
StyleswitcherAdmin::buildForm in src/Form/StyleswitcherAdmin.php
Form constructor.
StyleswitcherConfigTheme::buildForm in src/Form/StyleswitcherConfigTheme.php
Form constructor.

File

./styleswitcher.module, line 520
Module's hooks implementations and helper functions.

Code

function theme_styleswitcher_admin_style_overview(array $variables) {
  $style = $variables['style'];
  $output = Html::escape($style['label']);
  $output .= ' <small>' . t('(Machine name: @name)', [
    '@name' => $style['name'],
  ]) . '</small>';
  if (isset($style['path'])) {
    $description = $style['path'];
  }
  else {
    $description = t('Blank style which just removes effect of others.');
  }
  $output .= '<div class="description">' . $description . '</div>';
  return $output;
}