You are here

public static function SlickMediaFormatter::isApplicable in Slick Carousel 8.2

Overrides SlickFormatterTrait::isApplicable

File

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

Class

SlickMediaFormatter
Plugin implementation of the 'slick media' formatter.

Namespace

Drupal\slick\Plugin\Field\FieldFormatter

Code

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