function BaseFieldFileFormatterBase::viewValue
Same name in other branches
- 9 core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\BaseFieldFileFormatterBase::viewValue()
- 10 core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\BaseFieldFileFormatterBase::viewValue()
- 11.x core/modules/file/src/Plugin/Field/FieldFormatter/BaseFieldFileFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\BaseFieldFileFormatterBase::viewValue()
Generate the output appropriate for one field item.
Parameters
\Drupal\Core\Field\FieldItemInterface $item: One field item.
Return value
mixed The textual output generated.
1 call to BaseFieldFileFormatterBase::viewValue()
- BaseFieldFileFormatterBase::viewElements in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ BaseFieldFileFormatterBase.php - Builds a renderable array for a field value.
4 methods override BaseFieldFileFormatterBase::viewValue()
- DefaultFileFormatter::viewValue in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ DefaultFileFormatter.php - Generate the output appropriate for one field item.
- FileExtensionFormatter::viewValue in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileExtensionFormatter.php - Generate the output appropriate for one field item.
- FilemimeFormatter::viewValue in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FilemimeFormatter.php - Generate the output appropriate for one field item.
- FileUriFormatter::viewValue in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileUriFormatter.php - Generate the output appropriate for one field item.
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ BaseFieldFileFormatterBase.php, line 92
Class
- BaseFieldFileFormatterBase
- Base class for file formatters, which allow to link to the file download URL.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
protected abstract function viewValue(FieldItemInterface $item);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.