You are here

function template_preprocess_views_view_jquery_carousel in jQuery carousel 8

Prepares variables for views jquery_carousel templates.

Default template: views-view-jquery_carousel.html.twig.

Parameters

array $vars: An associative array containing:

  • view: A ViewExecutable object.
  • rows: The raw row data.

File

./jquery_carousel.module, line 128
Provide jquery carousel style plugin for views.

Code

function template_preprocess_views_view_jquery_carousel(&$vars) {
  _jquery_carousel_settings_format($vars['view']->style_plugin->options);
  _jquery_carousel_include_css_js($vars, $vars['view']->style_plugin->options);
  $vars['selector_class'] = new Attribute([
    'class' => [
      $vars['view']->style_plugin->options['selector'],
    ],
  ]);
}