You are here

public static function SliderPro::ajaxRefreshLayers in Slider Pro 8

Ajax callback to refresh layers.

Parameters

$form:

\Drupal\Core\Form\FormStateInterface $form_state:

Return value

\Drupal\Core\Ajax\AjaxResponse

File

src/Plugin/views/style/SliderPro.php, line 433

Class

SliderPro
Plugin annotation @ViewsStyle( id = "slider_pro", title = @Translation("Slider Pro"), help = @Translation("Displays a view as a Slider Pro, using the Slider Pro jQuery plugin."), theme = "slider_pro_views_style", theme_file =…

Namespace

Drupal\slider_pro\Plugin\views\style

Code

public static function ajaxRefreshLayers($form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $response
    ->addCommand(new ReplaceCommand('#slider-pro-layers', $form['options']['style_options']['layers_wrapper']['layers']));
  return $response;
}