public function views_handler_filter::exposed_info in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 handlers/views_handler_filter.inc \views_handler_filter::exposed_info()
- 6.2 handlers/views_handler_filter.inc \views_handler_filter::exposed_info()
Tell the renderer about our exposed form.
This only needs to be overridden for particularly complex forms. And maybe not even then.
Return value
array|null For standard exposed filters. An array with the following keys:
- operator: The $form key of the operator. Set to NULL if no operator.
- value: The $form key of the value. Set to NULL if no value.
- label: The label to use for this piece.
For grouped exposed filters. An array with the following keys:
- value: The $form key of the value. Set to NULL if no value.
- label: The label to use for this piece.
Overrides views_handler::exposed_info
File
- handlers/
views_handler_filter.inc, line 1241 - Definitions of views_handler_filter and views_handler_filter_broken.
Class
- views_handler_filter
- Base class for filters.
Code
public function exposed_info() {
if (empty($this->options['exposed'])) {
return;
}
if ($this
->is_a_group()) {
return array(
'value' => $this->options['group_info']['identifier'],
'label' => $this->options['group_info']['label'],
'description' => $this->options['group_info']['description'],
);
}
return array(
'operator' => $this->options['expose']['operator_id'],
'value' => $this->options['expose']['identifier'],
'label' => $this->options['expose']['label'],
'description' => $this->options['expose']['description'],
);
}