Same name and namespace in other branches
- 8.9.x core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::propertyDefinitions()
- 9 core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::propertyDefinitions()
1 call to FileItem::propertyDefinitions()
- ImageItem::propertyDefinitions in core/
modules/ image/ src/ Plugin/ Field/ FieldType/ ImageItem.php
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 104
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;
}