You are here

public static function GridStackEntityFormatter::isApplicable in GridStack 8.2

Overrides GridStackFormatterTrait::isApplicable

File

src/Plugin/Field/FieldFormatter/GridStackEntityFormatter.php, line 23

Class

GridStackEntityFormatter
Plugin implementation of the 'GridStack Entity' formatter.

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') !== 'media';
}