You are here

protected function SemanticViewsStyle::defineOptions in Semantic Views 8.2

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

Overrides StylePluginBase::defineOptions

File

src/Plugin/views/style/SemanticViewsStyle.php, line 33

Class

SemanticViewsStyle
Style plugin to render each item in a slideshow.

Namespace

Drupal\semanticviews\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();

  // Group option definition.
  $options['group'] = [
    'contains' => [
      'element_type' => [
        'default' => 'h3',
      ],
      'attributes' => [
        'default' => 'class|title',
      ],
    ],
  ];

  // List option definition.
  $options['list'] = [
    'contains' => [
      'element_type' => [
        'default' => '',
      ],
      'attributes' => [
        'default' => '',
      ],
    ],
  ];

  // Row option definition.
  $options['row'] = [
    'contains' => [
      'attributes' => [
        'default' => "class|",
      ],
      'element_type' => [
        'default' => 'div',
      ],
      'first_class' => [
        'default' => 'first',
      ],
      'last_class' => [
        'default' => 'last',
      ],
      'last_every_nth' => [
        'default' => '0',
      ],
      'striping_classes' => [
        'default' => 'odd even',
      ],
    ],
  ];
  return $options;
}