You are here

public static function SlickMediaFormatter::isApplicable in Slick Media 8

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

File

src/Plugin/Field/FieldFormatter/SlickMediaFormatter.php, line 89

Class

SlickMediaFormatter
Plugin implementation of the 'slick media entity' formatter.

Namespace

Drupal\slick_media\Plugin\Field\FieldFormatter

Code

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