public static function GridStackMediaFormatter::isApplicable in GridStack 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/GridStackMediaFormatter.php \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackMediaFormatter::isApplicable()
Overrides GridStackFormatterTrait::isApplicable
File
- src/
Plugin/ Field/ FieldFormatter/ GridStackMediaFormatter.php, line 15
Class
- GridStackMediaFormatter
- Plugin implementation of the 'GridStack Media' formatter.
Namespace
Drupal\gridstack\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
$storage = $field_definition
->getFieldStorageDefinition();
return $storage
->isMultiple() && $storage
->getSetting('target_type') === 'media';
}