public function date_views_filter_handler::extra_options_form in Date 7.2
Same name and namespace in other branches
- 8 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::extra_options_form()
- 7.3 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::extra_options_form()
- 7 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::extra_options_form()
Provide a form for setting options.
Overrides date_views_filter_handler_simple::extra_options_form
File
- date_views/
includes/ date_views_filter_handler.inc, line 149 - A flexible, configurable date filter.
Class
- date_views_filter_handler
- A flexible, configurable date filter.
Code
public function extra_options_form(&$form, &$form_state) {
parent::extra_options_form($form, $form_state);
$fields = date_views_fields($this->base_table);
$options = array();
foreach ($fields['name'] as $name => $field) {
$options[$name] = $field['label'];
}
$form['date_fields'] = array(
'#title' => t('Date field(s)'),
'#type' => 'checkboxes',
'#options' => $options,
'#default_value' => $this->options['date_fields'],
'#multiple' => FALSE,
'#description' => t('Select date field(s) to filter.'),
'#required' => TRUE,
);
$form['date_method'] = array(
'#title' => t('Method'),
'#type' => 'radios',
'#options' => array(
'OR' => t('OR'),
'AND' => t('AND'),
),
'#default_value' => $this->options['date_method'],
'#description' => t('Method of handling multiple date fields in the same query. Return items that have any matching date field (date = field_1 OR field_2), or only those with matches in all selected date fields (date = field_1 AND field_2).'),
);
}