class DateFieldItem in Date 8
Defines the 'text_item' and 'text_long_item' entity field items.
Hierarchy
- class \Drupal\date_field\Type\DateFieldItem extends \Drupal\Core\Entity\Field\FieldItemBase
Expanded class hierarchy of DateFieldItem
File
- date_field/
lib/ Drupal/ date_field/ Type/ DateFieldItem.php, line 15 - Definition of Drupal\date\Type\DateItem.
Namespace
Drupal\date_field\TypeView source
class DateFieldItem extends FieldItemBase {
/**
* Field definitions of the contained properties.
*
* @see self::getPropertyDefinitions()
*
* @var array
*/
static $propertyDefinitions;
/**
* Implements ComplexDataInterface::getPropertyDefinitions().
*/
public function getPropertyDefinitions() {
if (!isset(self::$propertyDefinitions)) {
self::$propertyDefinitions['value'] = array(
'type' => 'date',
'label' => t('Date value'),
);
self::$propertyDefinitions['value2'] = array(
'type' => 'date',
'label' => t('End Date value'),
);
self::$propertyDefinitions['data'] = array(
'type' => 'string',
'label' => t('A serialized array with more date info.'),
);
}
return self::$propertyDefinitions;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DateFieldItem:: |
static | property | Field definitions of the contained properties. | |
DateFieldItem:: |
public | function | Implements ComplexDataInterface::getPropertyDefinitions(). |