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

Views Slideshow: Controls.

Related topics

File

./views_slideshow.theme.inc, line 318

Code

function template_preprocess_views_slideshow_controls_widget(&$vars) {
    // Add JavaScript settings for the controls type.
    $vars['#attached']['library'][] = 'views_slideshow/widget_info';
    $vars['#attached']['drupalSettings']['viewsSlideshowControls'][$vars['vss_id']] = [
        $vars['location'] => [
            'type' => \Drupal::service('views_slideshow.format_addons_name')->format($vars['settings']['type']),
        ],
    ];
    $vars['widget'] = [
        '#theme' => $vars['view']->buildThemeFunctions($vars['settings']['type']),
        '#vss_id' => $vars['vss_id'],
        '#view' => $vars['view'],
        '#settings' => $vars['settings'],
        '#location' => $vars['location'],
        '#rows' => $vars['rows'],
    ];
}