Skip to content
Snippets Groups Projects
Commit 769d6112 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2239241 by Berdir, mr.baileys | tstoeckler: DateItem is completely broken, remove it.

parent a0290ec6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
<?php
/**
* @file
* Contains \Drupal\Core\Entity\Plugin\Field\FieldType\DateItem.
*/
namespace Drupal\Core\Field\Plugin\Field\FieldType;
use Drupal\Core\Field\FieldItemBase;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\TypedData\DataDefinition;
/**
* Defines the 'date' entity field type.
*
* @FieldType(
* id = "date",
* label = @Translation("Date"),
* description = @Translation("An entity field containing a date value."),
* no_ui = TRUE
* )
*/
class DateItem extends FieldItemBase {
/**
* {@inheritdoc}
*/
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('date')
->setLabel(t('Date value'));
return $properties;
}
/**
* {@inheritdoc}
*/
public static function schema(FieldStorageDefinitionInterface $field_definition) {
return array(
'columns' => array(
'value' => array(
'type' => 'varchar',
'length' => 20,
'not null' => FALSE,
),
),
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment