function TextItemBase::propertyDefinitions
Same name in other branches
- 9 core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php \Drupal\text\Plugin\Field\FieldType\TextItemBase::propertyDefinitions()
- 10 core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php \Drupal\text\Plugin\Field\FieldType\TextItemBase::propertyDefinitions()
- 11.x core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php \Drupal\text\Plugin\Field\FieldType\TextItemBase::propertyDefinitions()
Overrides FieldItemInterface::propertyDefinitions
1 call to TextItemBase::propertyDefinitions()
- TextWithSummaryItem::propertyDefinitions in core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php - Defines field item properties.
1 method overrides TextItemBase::propertyDefinitions()
- TextWithSummaryItem::propertyDefinitions in core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php - Defines field item properties.
File
-
core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextItemBase.php, line 19
Class
- TextItemBase
- Base class for 'text' configurable field types.
Namespace
Drupal\text\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('string')->setLabel(t('Text'))
->setRequired(TRUE);
$properties['format'] = DataDefinition::create('filter_format')->setLabel(t('Text format'));
$properties['processed'] = DataDefinition::create('string')->setLabel(t('Processed text'))
->setDescription(t('The text with the text format applied.'))
->setComputed(TRUE)
->setClass('\\Drupal\\text\\TextProcessed')
->setSetting('text source', 'value')
->setInternal(FALSE);
return $properties;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.