You are here

public function BlazyViewsTest::buildOptionsForm in Blazy 8.2

Same name and namespace in other branches
  1. 8 tests/modules/blazy_test/src/Plugin/views/style/BlazyViewsTest.php \Drupal\blazy_test\Plugin\views\style\BlazyViewsTest::buildOptionsForm()

Overrides parent::buildOptionsForm().

Overrides StylePluginBase::buildOptionsForm

File

tests/modules/blazy_test/src/Plugin/views/style/BlazyViewsTest.php, line 47

Class

BlazyViewsTest
Blazy Views Test style plugin.

Namespace

Drupal\blazy_test\Plugin\views\style

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  $fields = [
    'captions',
    'layouts',
    'images',
    'links',
    'titles',
    'classes',
    'overlays',
    'thumbnails',
    'layouts',
  ];
  $definition = $this
    ->getDefinedFieldOptions($fields);
  $definition += [
    'namespace' => 'blazy',
    'settings' => $this->options,
    'style' => TRUE,
  ];

  // Build the form.
  $this
    ->admin()
    ->buildSettingsForm($form, $definition);

  // Blazy doesn't need complex grid with multiple groups.
  unset($form['layout'], $form['preserve_keys'], $form['grid_header'], $form['visible_items']);
}