You are here

public function ViewsBootstrapCarouselPluginStyle::options_form in Views Bootstrap 7.3

Same name and namespace in other branches
  1. 7.2 plugins/carousel/views_bootstrap_carousel_plugin_style.inc \ViewsBootstrapCarouselPluginStyle::options_form()

Form.

Overrides views_plugin_style::options_form

File

plugins/carousel/views_bootstrap_carousel_plugin_style.inc, line 30
Definition of views_bootstrap_plugin_style.

Class

ViewsBootstrapCarouselPluginStyle
Class to define a style plugin handler.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['help'] = array(
    '#markup' => t('The Bootstrap carousel displays content as a slideshow (<a href="!docs">see documentation</a>).', [
      '!docs' => 'https://www.drupal.org/docs/7/modules/views-bootstrap/carousel',
    ]),
    '#weight' => -99,
  );
  $form['interval'] = array(
    '#type' => 'textfield',
    '#required' => TRUE,
    '#title' => t('Interval'),
    '#description' => t('The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.'),
    '#default_value' => $this->options['interval'],
  );
  $form['navigation'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show navigation'),
    '#default_value' => $this->options['navigation'],
  );
  $form['indicators'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show indicators'),
    '#default_value' => $this->options['indicators'],
  );
  $form['wrap'] = array(
    '#type' => 'checkbox',
    '#title' => t('Wrap'),
    '#description' => t('Restarts the carousel after the last slide, rather than having a hard stop.'),
    '#default_value' => $this->options['wrap'],
  );
  $form['pause'] = array(
    '#type' => 'checkbox',
    '#title' => t('Pause on hover'),
    '#description' => t('Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.'),
    '#default_value' => $this->options['pause'],
  );
  $form['items_per_slide'] = array(
    '#type' => 'textfield',
    '#title' => t('Item per slide'),
    '#description' => t('How many items shown per slide.'),
    '#default_value' => $this->options['items_per_slide'],
  );
}