You are here

protected function ExposedFormPluginBase::defineOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase::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 PluginBase::defineOptions

1 call to ExposedFormPluginBase::defineOptions()
InputRequired::defineOptions in core/modules/views/src/Plugin/views/exposed_form/InputRequired.php
Information about options for all kinds of purposes will be held here.
1 method overrides ExposedFormPluginBase::defineOptions()
InputRequired::defineOptions in core/modules/views/src/Plugin/views/exposed_form/InputRequired.php
Information about options for all kinds of purposes will be held here.

File

core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php, line 43
Contains \Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase.

Class

ExposedFormPluginBase
Base class for Views exposed filter form plugins.

Namespace

Drupal\views\Plugin\views\exposed_form

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['submit_button'] = array(
    'default' => $this
      ->t('Apply'),
  );
  $options['reset_button'] = array(
    'default' => FALSE,
  );
  $options['reset_button_label'] = array(
    'default' => $this
      ->t('Reset'),
  );
  $options['exposed_sorts_label'] = array(
    'default' => $this
      ->t('Sort by'),
  );
  $options['expose_sort_order'] = array(
    'default' => TRUE,
  );
  $options['sort_asc_label'] = array(
    'default' => $this
      ->t('Asc'),
  );
  $options['sort_desc_label'] = array(
    'default' => $this
      ->t('Desc'),
  );
  return $options;
}