public function SearchApiViewsHandlerFilterLocation::operator_form in Search API Location 7.2
Options form subform for setting the operator.
This may be overridden by child classes, and it must define $form['operator'].
Overrides views_handler_filter::operator_form
See also
options_form()
File
- search_api_location_views/
handler_filter_location.inc, line 90 - Provides the views handler for location fields.
Class
- SearchApiViewsHandlerFilterLocation
- Handler class for a Views location filter.
Code
public function operator_form(&$form, &$form_state) {
if ($this->options['radius_type'] == 'select') {
$form['operator'] = array(
'#type' => 'select',
'#options' => $this
->operator_options(),
);
$form['operator']['#default_value'] = $this->operator;
}
else {
$form['operator'] = array(
'#type' => 'textfield',
'#title' => t('Distance'),
'#size' => 10,
'#default_value' => $this->operator,
);
}
}