You are here

public static function GridStackFileFormatter::isApplicable in GridStack 8.2

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

Overrides GridStackFormatterTrait::isApplicable

File

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

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';
}