Definition of Drupal\Core\Entity\Field\Type\StringItem.
<?php
/**
* @file
* Definition of Drupal\Core\Entity\Field\Type\StringItem.
*/
namespace Drupal\Core\Entity\Field\Type;
use Drupal\Core\Entity\Field\FieldItemBase;
/**
* Defines the 'string_field' entity field item.
*/
class StringItem 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' => 'string',
'label' => t('Text value'),
);
}
return self::$propertyDefinitions;
}
}
Name | Description |
---|---|
StringItem | Defines the 'string_field' entity field item. |