1 views_handler_filter.inc | views_handler_filter::operator_form(&$form, &$form_state) |
Options form subform for setting the operator.
This may be overridden by child classes, and it must define $form['operator'];
See also
options_form()
File
- core/
modules/ views/ handlers/ views_handler_filter.inc, line 276 - @todo.
Class
- views_handler_filter
- Base class for filters.
Code
function operator_form(&$form, &$form_state) {
$options = $this->operator_options();
if (!empty($options)) {
$form['operator'] = array(
'#type' => count($options) < 10 ? 'radios' : 'select',
'#title' => t('Operator'),
'#default_value' => $this->operator,
'#options' => $options,
);
}
}