You are here

public function SlickViewsBase::buildSettingsForm in Slick Views 7.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/style/SlickViewsBase.php \Drupal\slick_views\Plugin\views\style\SlickViewsBase::buildSettingsForm()

Build the Slick settings form.

2 calls to SlickViewsBase::buildSettingsForm()
SlickGrouping::options_form in src/Plugin/views/style/SlickGrouping.php
Overrides parent::buildOptionsForm().
SlickViews::options_form in src/Plugin/views/style/SlickViews.php
Overrides parent::buildOptionsForm().

File

src/Plugin/views/style/SlickViewsBase.php, line 98

Class

SlickViewsBase
The base class common for Slick style plugins.

Namespace

Drupal\slick_views\Plugin\views\style

Code

public function buildSettingsForm(&$form, $definition) {
  $this
    ->admin()
    ->buildSettingsForm($form, $definition);
  $title = '<p class="form__header form__title">';
  $title .= t('Check Vanilla for content/custom markups, not fields. <small>See it under <strong>Format > Show</strong> section. Otherwise slick markups apply which require some fields added below.</small>');
  $title .= '</p>';
  $form['opening']['#markup'] .= $title;
  if (isset($form['image'])) {
    $form['image']['#description'] .= ' ' . t('Use Blazy formatter to have it lazyloaded. Other supported Formatters: Colorbox, Intense, Responsive image, Video Embed Field, Youtube Field.');
  }
  if (isset($form['overlay'])) {
    $form['overlay']['#description'] .= ' ' . t('Be sure to CHECK "<strong>Style settings > Use field template</strong>" _only if using Slick formatter for nested sliders, otherwise keep it UNCHECKED!');
  }

  // Bring in dots thumbnail effect normally used by Slick Image formatter.
  $form['thumbnail_effect'] = [
    '#type' => 'select',
    '#title' => t('Dots thumbnail effect'),
    '#options' => [
      'hover' => t('Hoverable'),
      'grid' => t('Static grid'),
    ],
    '#empty_option' => t('- None -'),
    '#description' => t('Dependent on a Skin, Dots and Thumbnail image options. No asnavfor/ Optionset thumbnail is needed. <ol><li><strong>Hoverable</strong>: Dots pager are kept, and thumbnail will be hidden and only visible on dot mouseover, default to min-width 120px.</li><li><strong>Static grid</strong>: Dots are hidden, and thumbnails are displayed as a static grid acting like dots pager.</li></ol>Alternative to asNavFor aka separate thumbnails as slider.'),
    '#weight' => -100,
  ];
}