You are here

protected function Section::defineOptions in Workbench Access 8

Same name in this branch
  1. 8 src/Plugin/views/filter/Section.php \Drupal\workbench_access\Plugin\views\filter\Section::defineOptions()
  2. 8 src/Plugin/views/field/Section.php \Drupal\workbench_access\Plugin\views\field\Section::defineOptions()

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 ManyToOne::defineOptions

File

src/Plugin/views/filter/Section.php, line 153

Class

Section
Filter by assigned section.

Namespace

Drupal\workbench_access\Plugin\views\filter

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['operator']['default'] = 'in';
  $options['value']['default'] = [
    'All',
  ];
  $options['expose']['contains']['reduce'] = [
    'default' => TRUE,
  ];
  $options['section_filter']['contains']['show_hierarchy'] = [
    'default' => TRUE,
  ];
  return $options;
}