You are here

function date_field_info in Date 8

Same name and namespace in other branches
  1. 5.2 date/date.module \date_field_info()
  2. 5 date.module \date_field_info()
  3. 6.2 date/date.module \date_field_info()
  4. 6 date/date.module \date_field_info()
  5. 7.3 date.field.inc \date_field_info()
  6. 7 date.field.inc \date_field_info()
  7. 7.2 date.field.inc \date_field_info()

Implements hook_field_info().

3 calls to date_field_info()
date_tools_change_type_form in date_tools/date_tools.change_type.inc
Form constructor for the date type change form.
date_tools_change_type_form_submit in date_tools/date_tools.change_type.inc
Form submission handler for date_tools_change_type_form().
date_tools_wizard_field_types in date_tools/date_tools.wizard.inc
@todo.

File

./date.field.inc, line 31
Field hooks to implement a date field.

Code

function date_field_info() {
  return array(
    'date' => array(
      'label' => 'Date Range',
      'description' => t('Store a start and optional end date in the database as ISO dates.'),
      'settings' => array(
        'todate' => '',
        'granularity' => drupal_map_assoc(array(
          'year',
          'month',
          'day',
          'hour',
          'minute',
        )),
        'tz_handling' => 'site',
        'timezone_db' => 'UTC',
      ),
      'instance_settings' => array(
        'default_value' => 'now',
        'default_value_code' => '',
        'default_value2' => 'same',
        'default_value_code2' => '',
      ),
      'default_widget' => 'date_select',
      'default_formatter' => 'date_default',
      'default_token_formatter' => 'date_plain',
      'field item class' => '\\Drupal\\date\\Type\\DateItem',
    ),
  );
}