public static function FileUriFormatter::isApplicable in Drupal 10
Same name and namespace in other branches
- 8 core/modules/file/src/Plugin/Field/FieldFormatter/FileUriFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileUriFormatter::isApplicable()
- 9 core/modules/file/src/Plugin/Field/FieldFormatter/FileUriFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileUriFormatter::isApplicable()
Returns if the formatter can be used for the provided field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition that should be checked.
Return value
bool TRUE if the formatter can be used, FALSE otherwise.
Overrides BaseFieldFileFormatterBase::isApplicable
File
- core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileUriFormatter.php, line 62
Class
- FileUriFormatter
- Formatter to render the file URI to its download path.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return parent::isApplicable($field_definition) && $field_definition
->getName() === 'uri';
}