function template_preprocess_views_slideshow_controls_widget_render in Views Slideshow 8.3
Views Slideshow: Controls.
@inggroup themeable
1 string reference to 'template_preprocess_views_slideshow_controls_widget_render'
- views_slideshow_theme in ./
views_slideshow.module - Implements hook_theme().
File
- ./
views_slideshow.theme.inc, line 285 - The theme system, which controls the output of views slideshow.
Code
function template_preprocess_views_slideshow_controls_widget_render(&$vars) {
// Add javascript settings for the controls type.
$vars['#attached']['library'][] = 'views_slideshow/widget_info';
$vars['#attached']['drupalSettings']['viewsSlideshowControls'][$vars['vss_id']] = array(
$vars['location'] => array(
'type' => views_slideshow_format_addons_name($vars['settings']['type']),
),
);
$output = '';
if (empty($vars['settings']['hide_on_single_slide']) || count($vars['rows']) > $vars['view']->style_options['views_slideshow_cycle']['items_per_slide']) {
$output = array(
'#theme' => $vars['view']
->buildThemeFunctions($vars['settings']['type']),
'#vss_id' => $vars['vss_id'],
'#view' => $vars['view'],
'#settings' => $vars['settings'],
'#location' => $vars['location'],
'#rows' => $vars['rows'],
);
}
return \Drupal::service('renderer')
->render($output);
}