Same name in other branches
  1. 7.x-3.x contrib/views_slideshow_cycle/theme/views_slideshow_cycle.theme.inc \template_preprocess_views_slideshow_cycle_main_frame_row()
  2. 8.x-3.x modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc \template_preprocess_views_slideshow_cycle_main_frame_row()
  3. 8.x-4.x modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc \template_preprocess_views_slideshow_cycle_main_frame_row()

Views Slideshow slideshow rows.

Sujets associés

Fichier

modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc, line 148

Code

function template_preprocess_views_slideshow_cycle_main_frame_row(&$vars) {
    $current = $vars['count'] + 1;
    $vars['attributes']['class'][] = 'views_slideshow_cycle_slide';
    $vars['attributes']['class'][] = 'views_slideshow_slide views-row-' . $current;
    if ($vars['count']) {
        $vars['attributes']['class'][] = 'views_slideshow_cycle_hidden';
    }
    $vars['attributes']['class'][] = $vars['count'] % 2 ? 'views-row-even' : 'views-row-odd';
    $vars['rendered_items'] = [];
    foreach ($vars['items'] as $item_count => $item) {
        $vars['rendered_items'][] = [
            '#theme' => $vars['view']->buildThemeFunctions('views_slideshow_cycle_main_frame_row_item'),
            '#item' => $item,
            '#item_count' => $item_count,
            '#count' => $vars['count'],
            '#view' => $vars['view'],
            '#length' => count($vars['view']->result),
        ];
    }
}