public static function BlazyFileFormatter::isApplicable in Blazy 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/BlazyFileFormatter.php \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyFileFormatter::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 FormatterBase::isApplicable
File
- src/
Plugin/ Field/ FieldFormatter/ BlazyFileFormatter.php, line 30
Class
- BlazyFileFormatter
- Plugin implementation of the 'Blazy File' to get videos within images/files.
Namespace
Drupal\blazy\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return $field_definition
->getFieldStorageDefinition()
->getSetting('target_type') === 'file';
}