Views Slideshow: pager.

1 string reference to 'template_preprocess_views_slideshow_pager_widget_render'
views_slideshow_theme in ./views_slideshow.module
Implements hook_theme().

File

./views_slideshow.theme.inc, line 180

Code

function template_preprocess_views_slideshow_pager_widget_render(&$vars) {
    if (isset($vars['settings']['hide_on_single_slide']) && $vars['settings']['hide_on_single_slide'] === 1 && count($vars['rows']) < 2) {
        return '';
    }
    // Add javascript settings for the pager type.
    $vars['#attached']['library'][] = 'views_slideshow/widget_info';
    $vars['#attached']['drupalSettings']['viewsSlideshowPager'][$vars['vss_id']] = array(
        $vars['location'] => array(
            'type' => views_slideshow_format_addons_name($vars['settings']['type']),
        ),
    );
    // Create some attributes.
    $attributes['class'][] = 'widget_pager widget_pager_' . $vars['location'];
    $attributes['id'] = 'widget_pager_' . $vars['location'] . '_' . $vars['vss_id'];
    $pager = array(
        '#theme' => $vars['view']->buildThemeFunctions($vars['settings']['type']),
        '#vss_id' => $vars['vss_id'],
        '#view' => $vars['view'],
        '#settings' => $vars['settings'],
        '#location' => $vars['location'],
        '#attributes' => $attributes,
    );
    return \Drupal::service('renderer')->render($pager);
}