Same name and namespace in other branches
  1. 8.x-4.x views_slideshow.theme.inc \template_preprocess_views_slideshow_pager_widget() 1 comment

Views Slideshow: pager.

Related topics

File

./views_slideshow.theme.inc, line 199

Code

function template_preprocess_views_slideshow_pager_widget(&$vars) {
    // Add JavaScript settings for the pager type.
    $vars['#attached']['library'][] = 'views_slideshow/widget_info';
    $vars['#attached']['drupalSettings']['viewsSlideshowPager'][$vars['vss_id']] = [
        $vars['location'] => [
            'type' => \Drupal::service('views_slideshow.format_addons_name')->format($vars['settings']['type']),
        ],
    ];
    // Create some attributes.
    $attributes['class'][] = 'widget_pager widget_pager_' . $vars['location'];
    $attributes['id'] = 'widget_pager_' . $vars['location'] . '_' . $vars['vss_id'];
    $vars['widget'] = [
        '#theme' => $vars['view']->buildThemeFunctions($vars['settings']['type']),
        '#vss_id' => $vars['vss_id'],
        '#view' => $vars['view'],
        '#settings' => $vars['settings'],
        '#location' => $vars['location'],
        '#attributes' => $attributes,
    ];
}