function MediaThumbnailFormatter::isApplicable
Same name in other branches
- 9 core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php \Drupal\media\Plugin\Field\FieldFormatter\MediaThumbnailFormatter::isApplicable()
- 8.9.x core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php \Drupal\media\Plugin\Field\FieldFormatter\MediaThumbnailFormatter::isApplicable()
- 10 core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php \Drupal\media\Plugin\Field\FieldFormatter\MediaThumbnailFormatter::isApplicable()
Overrides FormatterBase::isApplicable
File
-
core/
modules/ media/ src/ Plugin/ Field/ FieldFormatter/ MediaThumbnailFormatter.php, line 171
Class
- MediaThumbnailFormatter
- Plugin implementation of the 'media_thumbnail' formatter.
Namespace
Drupal\media\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
// This formatter is only available for entity types that reference
// media items.
return $field_definition->getFieldStorageDefinition()
->getSetting('target_type') == 'media';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.