1 views_plugin_exposed_form.inc views_plugin_exposed_form::option_definition()

Information about options for all kinds of purposes will be held here. @code 'option_name' => array(

  • 'default' => default value,
  • 'translatable' => (optional) TRUE/FALSE,
  • '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().
  • 'bool' => (optional) TRUE/FALSE Is the value a boolean value. This will change the internal format to TRUE/FALSE instead of 1/0.

),

Return value

array: Returns the options of this handler/plugin.

Overrides views_object::option_definition

See also

views_object::unpack_translatable()

File

core/modules/views/plugins/views_plugin_exposed_form.inc, line 37
Definition of views_plugin_exposed_form.

Class

views_plugin_exposed_form
The base plugin to handle exposed filter forms.

Code

function option_definition() {
  $options = parent::option_definition();
  $options['submit_button'] = array('default' => 'Apply', 'translatable' => TRUE);
  $options['reset_button'] = array('default' => FALSE, 'bool' => TRUE);
  $options['reset_button_label'] = array('default' => 'Reset', 'translatable' => TRUE);
  $options['exposed_sorts_label'] = array('default' => 'Sort by', 'translatable' => TRUE);
  $options['expose_sort_order'] = array('default' => TRUE, 'bool' => TRUE);
  $options['sort_asc_label'] = array('default' => 'Asc', 'translatable' => TRUE);
  $options['sort_desc_label'] = array('default' => 'Desc', 'translatable' => TRUE);
  $options['autosubmit'] = array('default' => FALSE, 'bool' => TRUE);
  $options['autosubmit_hide'] = array('default' => TRUE, 'bool' => TRUE);
  return $options;
}