public static function FilemimeFormatter::isApplicable in Drupal 8
Same name and namespace in other branches
- 9 core/modules/file/src/Plugin/Field/FieldFormatter/FilemimeFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FilemimeFormatter::isApplicable()
- 10 core/modules/file/src/Plugin/Field/FieldFormatter/FilemimeFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FilemimeFormatter::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/ FilemimeFormatter.php, line 25
Class
- FilemimeFormatter
- Formatter to render the file MIME type, with an optional icon.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return parent::isApplicable($field_definition) && $field_definition
->getName() === 'filemime';
}