You are here

public static function GridStackFileFormatter::isApplicable in GridStack 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/GridStackFileFormatter.php \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackFileFormatter::isApplicable()

Overrides GridStackFormatterTrait::isApplicable

File

src/Plugin/Field/FieldFormatter/GridStackFileFormatter.php, line 30

Class

GridStackFileFormatter
Plugin implementation of the 'GridStack' formatter to get ME within images.

Namespace

Drupal\gridstack\Plugin\Field\FieldFormatter

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
  $storage = $field_definition
    ->getFieldStorageDefinition();
  return $storage
    ->isMultiple() && $storage
    ->getSetting('target_type') === 'file';
}