function LinkItem::propertyDefinitions
Same name in other branches
- 9 core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::propertyDefinitions()
- 8.9.x core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::propertyDefinitions()
- 11.x core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::propertyDefinitions()
Overrides FieldItemInterface::propertyDefinitions
File
-
core/
modules/ link/ src/ Plugin/ Field/ FieldType/ LinkItem.php, line 48
Class
- LinkItem
- Plugin implementation of the 'link' field type.
Namespace
Drupal\link\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['uri'] = DataDefinition::create('uri')->setLabel(new TranslatableMarkup('URI'));
$properties['title'] = DataDefinition::create('string')->setLabel(new TranslatableMarkup('Link text'));
$properties['options'] = MapDataDefinition::create()->setLabel(new TranslatableMarkup('Options'));
return $properties;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.