You are here

protected function SlickViewsBase::getDefinedFormScopes 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::getDefinedFormScopes()

Returns the defined scopes for the current form.

2 calls to SlickViewsBase::getDefinedFormScopes()
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 69

Class

SlickViewsBase
The base class common for Slick style plugins.

Namespace

Drupal\slick_views\Plugin\views\style

Code

protected function getDefinedFormScopes() {

  // Pass the common field options relevant to this style.
  $fields = [
    'captions',
    'classes',
    'images',
    'layouts',
    'links',
    'overlays',
    'thumbnails',
    'thumb_captions',
    'titles',
  ];

  // Fetches the returned field definitions to be used to define form scopes.
  $definition = $this
    ->getDefinedFieldOptions($fields);
  foreach ([
    'id',
    'nav',
    'thumb_positions',
    'vanilla',
  ] as $key) {
    $definition[$key] = TRUE;
  }
  $definition['forms'] = [
    'fieldable' => TRUE,
    'grid' => TRUE,
  ];
  $definition['opening_class'] = 'form--views';
  $definition['_views'] = TRUE;
  return $definition;
}