You are here

public function FlickityViewsStyle::buildOptionsForm in Flickity Carousel 8

Same name and namespace in other branches
  1. 8.2 modules/views/src/Plugin/views/style/FlickityViewsStyle.php \Drupal\flickity_views\Plugin\views\style\FlickityViewsStyle::buildOptionsForm()
  2. 3.0.x modules/views/src/Plugin/views/style/FlickityViewsStyle.php \Drupal\flickity_views\Plugin\views\style\FlickityViewsStyle::buildOptionsForm()

Provide a form to edit options for this plugin.

Overrides StylePluginBase::buildOptionsForm

File

modules/views/src/Plugin/views/style/FlickityViewsStyle.php, line 70
FlickityViewsStyle.php

Class

FlickityViewsStyle
Defines a style plugin that renders a Flickity carousel.

Namespace

Drupal\flickity_views\Plugin\views\style

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['settings'] = array(
    '#title' => $this
      ->t('Settings group'),
    '#type' => 'select',
    '#options' => flickity_settings_list(),
    '#description' => $this
      ->t('The settings group to apply.'),
    '#default_value' => $this->options['settings'] ? $this->options['settings'] : 'default_group',
  );
}