Same name and namespace in other branches
  1. 8.9.x core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::propertyDefinitions()
  2. 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\FieldType

Code

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;
}