Same name and namespace in other branches
  1. 8.x-1.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 dans plugins/QuickQuicktabs.inc
The only method that renderer plugins must implement.

Fichier

./quicktabs.module, line 631

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['class'][] = drupal_html_class($tab['#title']);
            $item['data'] = drupal_render($tab);
            $variables['items'][] = $item;
        }
    }
    return theme('item_list', $variables);
}