Same name in other branches
  1. 7.x-3.x quicktabs.module \theme_qt_quicktabs_tabset()

Theme function to output tablinks for classic Quicktabs style tabs.

1 theme call to theme_qt_quicktabs_tabset()
QuickQuicktabs::render in src/Plugin/QuickRender/QuickQuicktabs.php

File

./quicktabs.module, line 569

Code

function theme_qt_quicktabs_tabset($vars) {
    $variables = array(
        'attributes' => array(
            'class' => 'quicktabs-tabs quicktabs-style-' . $vars['tabset']['#options']['style'],
        ),
        'items' => array(),
    );
    foreach (element_children($vars['tabset']['tablinks']) as $key) {
        $item = array();
        if (is_array($vars['tabset']['tablinks'][$key])) {
            $tab = $vars['tabset']['tablinks'][$key];
            if ($key == $vars['tabset']['#options']['active']) {
                $item['class'] = array(
                    'active',
                );
            }
            $item['data'] = drupal_render($tab);
            $variables['items'][] = $item;
        }
    }
    return theme('item_list', $variables);
}