public function TextItem::getPropertyDefinitions

Implements ComplexDataInterface::getPropertyDefinitions().

Overrides Map::getPropertyDefinitions

1 call to TextItem::getPropertyDefinitions()
TextSummaryItem::getPropertyDefinitions in drupal/core/modules/text/lib/Drupal/text/Type/TextSummaryItem.php
Implements ComplexDataInterface::getPropertyDefinitions().
1 method overrides TextItem::getPropertyDefinitions()
TextSummaryItem::getPropertyDefinitions in drupal/core/modules/text/lib/Drupal/text/Type/TextSummaryItem.php
Implements ComplexDataInterface::getPropertyDefinitions().

File

drupal/core/modules/text/lib/Drupal/text/Type/TextItem.php, line 29
Definition of Drupal\text\Type\TextItem.

Class

TextItem
Defines the 'text_field' and 'text_long_field' entity field items.

Namespace

Drupal\text\Type

Code

public function getPropertyDefinitions() {
  if (!isset(static::$propertyDefinitions)) {
    static::$propertyDefinitions['value'] = array(
      'type' => 'string',
      'label' => t('Text value'),
    );
    static::$propertyDefinitions['format'] = array(
      'type' => 'string',
      'label' => t('Text format'),
    );
    static::$propertyDefinitions['processed'] = array(
      'type' => 'string',
      'label' => t('Processed text'),
      'description' => t('The text value with the text format applied.'),
      'computed' => TRUE,
      'class' => '\\Drupal\\text\\TextProcessed',
      'settings' => array(
        'text source' => 'value',
      ),
    );
  }
  return static::$propertyDefinitions;
}