You are here

function template_preprocess_views_slideshow_controls_widget in Views Slideshow 8.4

Views Slideshow: Controls.

Related topics

File

./views_slideshow.theme.inc, line 318
The theme system, which controls the output of views slideshow.

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'],
  ];
}