function DateTimeItem::schema

Same name in other branches
  1. 9 core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem::schema()
  2. 8.9.x core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem::schema()
  3. 11.x core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem::schema()

Overrides FieldItemInterface::schema

1 call to DateTimeItem::schema()
DateRangeItem::schema in core/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php
Returns the schema for the field.
1 method overrides DateTimeItem::schema()
DateRangeItem::schema in core/modules/datetime_range/src/Plugin/Field/FieldType/DateRangeItem.php
Returns the schema for the field.

File

core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php, line 72

Class

DateTimeItem
Plugin implementation of the 'datetime' field type.

Namespace

Drupal\datetime\Plugin\Field\FieldType

Code

public static function schema(FieldStorageDefinitionInterface $field_definition) {
    return [
        'columns' => [
            'value' => [
                'description' => 'The date value.',
                'type' => 'varchar',
                'length' => 20,
            ],
        ],
        'indexes' => [
            'value' => [
                'value',
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.