function views_handler_filter::option_definition

3.x views_handler_filter.inc views_handler_filter::option_definition()
2.x views_handler_filter.inc views_handler_filter::option_definition()

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

'option_name' => array(
 - 'default' => default value,
 - 'translatable' => TRUE/FALSE (wrap in t() on export if true),
 - 'contains' => array of items this contains, with its own defaults, etc.
     If contains is set, the default will be ignored and assumed to
     be array()

 ),
 

Each option may have any of the following functions:

  • export_option_OPTIONNAME -- Special export handling if necessary.
  • translate_option_OPTIONNAME -- Special handling for translating data within the option, if necessary.

Overrides views_object::option_definition

6 calls to views_handler_filter::option_definition()
views_handler_filter_boolean_operator::option_definition in handlers/views_handler_filter_boolean_operator.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_in_operator::option_definition in handlers/views_handler_filter_in_operator.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_node_tnid::option_definition in modules/translation/views_handler_filter_node_tnid.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_numeric::option_definition in handlers/views_handler_filter_numeric.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_search::option_definition in modules/search/views_handler_filter_search.inc
Information about options for all kinds of purposes will be held here.

... See full list

6 methods override views_handler_filter::option_definition()
views_handler_filter_boolean_operator::option_definition in handlers/views_handler_filter_boolean_operator.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_in_operator::option_definition in handlers/views_handler_filter_in_operator.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_node_tnid::option_definition in modules/translation/views_handler_filter_node_tnid.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_numeric::option_definition in handlers/views_handler_filter_numeric.inc
Information about options for all kinds of purposes will be held here.
views_handler_filter_search::option_definition in modules/search/views_handler_filter_search.inc
Information about options for all kinds of purposes will be held here.

... See full list

File

handlers/views_handler_filter.inc, line 53

Class

views_handler_filter
Base class for filters.

Code

function option_definition() {
  $options = parent::option_definition();

  $options['operator'] = array('default' => '=');
  $options['value'] = array('default' => '');
  $options['group'] = array('default' => '0');
  $options['exposed'] = array('default' => FALSE);
  $options['expose'] = array(
    'contains' => array(
      'operator' => array('default' => FALSE),
      'label' => array('default' => '', 'translatable' => TRUE),
    ),
  );

  return $options;
}