You are here

function birthdays_field_views_handler_field::options_form in Birthdays 7

Overrides views_handler_field_field::options_form().

Overrides views_handler_field_field::options_form

File

views/birthdays_field_views_handler_field.inc, line 29
The birthdays_field_views_handler_field class.

Class

birthdays_field_views_handler_field
A Views field handler that provides click sorting of birthday fields.

Code

function options_form(&$form, &$form_state) {

  // Adjust the parent form.
  parent::options_form($form, $form_state);
  unset($form['click_sort_column']);

  // Add a sorting option.
  $form['click_sort_mode'] = array(
    '#type' => 'radios',
    '#title' => 'Click sort mode',
    '#options' => array(
      'all' => t('Sort by year, month and day.'),
      'year' => t('Sort by month and day.'),
      'now' => t('Sort by time to next birthday.'),
    ),
    '#description' => t('The way this column should beclick sorted.'),
    '#fieldset' => 'more',
    '#default_value' => $this->options['click_sort_mode'],
  );
}