You are here

public function views_handler_field_publication_date::options_form in Publication Date 7.2

Default options form provides the label widget that all fields should have.

Overrides views_handler_field_date::options_form

File

includes/views_handler_field_publication_date.inc, line 32
Definition of views_handler_field_publication_date.

Class

views_handler_field_publication_date
A handler to provide proper displays for publication dates.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['null_date'] = array(
    '#type' => 'radios',
    '#title' => t('Treat empty publication date as'),
    '#options' => array(
      'null' => t('NULL'),
      'now' => t('Current time'),
      'created' => t('Content created date'),
      'changed' => t('Content last modified date'),
    ),
    '#description' => t('How should we treat content without a publication date?'),
    '#default_value' => $this->options['null_date'],
  );
}