1 views_handler_sort_date.inc | views_handler_sort_date::options_form(&$form, &$form_state) |
Basic options for all sort criteria
Overrides views_handler_sort::options_form
File
- core/
modules/ views/ handlers/ views_handler_sort_date.inc, line 24 - Definition of views_handler_sort_date.
Class
- views_handler_sort_date
- Basic sort handler for dates.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['granularity'] = array(
'#type' => 'radios',
'#title' => t('Granularity'),
'#options' => array(
'second' => t('Second'),
'minute' => t('Minute'),
'hour' => t('Hour'),
'day' => t('Day'),
'month' => t('Month'),
'year' => t('Year'),
),
'#description' => t('The granularity is the smallest unit to use when determining whether two dates are the same; for example, if the granularity is "Year" then all dates in 1999, regardless of when they fall in 1999, will be considered the same date.'),
'#default_value' => $this->options['granularity'],
);
}