function TextWithSummaryItem::propertyDefinitions
Overrides TextItemBase::propertyDefinitions
File
-
core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php, line 43
Class
- TextWithSummaryItem
- Plugin implementation of the 'text_with_summary' field type.
Namespace
Drupal\text\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties = parent::propertyDefinitions($field_definition);
$properties['summary'] = DataDefinition::create('string')->setLabel(new TranslatableMarkup('Summary'));
$properties['summary_processed'] = DataDefinition::create('string')->setLabel(new TranslatableMarkup('Processed summary'))
->setDescription(new TranslatableMarkup('The summary text with the text format applied.'))
->setComputed(TRUE)
->setClass('\\Drupal\\text\\TextProcessed')
->setSetting('text source', 'summary');
return $properties;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.