function template_preprocess_views_bootstrap_tab_plugin_style in Views Bootstrap 7.2
Same name and namespace in other branches
- 7.3 templates/tab/theme.inc \template_preprocess_views_bootstrap_tab_plugin_style()
Implementation of template preprocess for the view.
File
- templates/
tab/ theme.inc, line 6
Code
function template_preprocess_views_bootstrap_tab_plugin_style(&$vars) {
$view =& $vars['view'];
$tab_field = $vars['options']['tab_field'];
$vars['tab_type'] = $vars['options']['tab_type'];
// Get tabs.
if (isset($view->field[$tab_field])) {
foreach (array_keys($vars['rows']) as $key) {
$vars['tabs'][$key] = $view->style_plugin
->get_field_value($key, $tab_field);
}
}
$keys = array_keys($vars['rows']);
$vars['first_key'] = reset($keys);
}