function FileItem::schema
Same name in other branches
- 9 core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::schema()
- 8.9.x core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::schema()
- 11.x core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::schema()
Overrides EntityReferenceItem::schema
1 method overrides FileItem::schema()
- ImageItem::schema in core/
modules/ image/ src/ Plugin/ Field/ FieldType/ ImageItem.php
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldType/ FileItem.php, line 83
Class
- FileItem
- Plugin implementation of the 'file' field type.
Namespace
Drupal\file\Plugin\Field\FieldTypeCode
public static function schema(FieldStorageDefinitionInterface $field_definition) {
return [
'columns' => [
'target_id' => [
'description' => 'The ID of the file entity.',
'type' => 'int',
'unsigned' => TRUE,
],
'display' => [
'description' => 'Flag to control whether this file should be displayed when viewing content.',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'default' => 1,
],
'description' => [
'description' => 'A description of the file.',
'type' => 'text',
],
],
'indexes' => [
'target_id' => [
'target_id',
],
],
'foreign keys' => [
'target_id' => [
'table' => 'file_managed',
'columns' => [
'target_id' => 'fid',
],
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.