function FileItem::propertyDefinitions
Same name and namespace in other branches
- 9 core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::propertyDefinitions()
- 8.9.x core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::propertyDefinitions()
- 10 core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::propertyDefinitions()
Overrides EntityReferenceItem::propertyDefinitions
1 method overrides FileItem::propertyDefinitions()
- ImageItem::propertyDefinitions in core/
modules/ image/ src/ Plugin/ Field/ FieldType/ ImageItem.php
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldType/ FileItem.php, line 118
Class
- FileItem
- Plugin implementation of the 'file' field type.
Namespace
Drupal\file\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties = parent::propertyDefinitions($field_definition);
$properties['display'] = DataDefinition::create('boolean')->setLabel(new TranslatableMarkup('Display'))
->setDescription(new TranslatableMarkup('Flag to control whether this file should be displayed when viewing content'));
$properties['description'] = DataDefinition::create('string')->setLabel(new TranslatableMarkup('Description'));
return $properties;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.