You are here

protected function MediaResponsiveThumbnailFormatter::needsEntityLoad in Media Responsive Thumbnail 8

This has to be overridden because FileFormatterBase expects $item to be of type \Drupal\file\Plugin\Field\FieldType\FileItem and calls isDisplayed() which is not in FieldItemInterface.

Overrides FileFormatterBase::needsEntityLoad

File

src/Plugin/Field/FieldFormatter/MediaResponsiveThumbnailFormatter.php, line 99

Class

MediaResponsiveThumbnailFormatter
Plugin implementation of the 'media_responsive_thumbnail' formatter.

Namespace

Drupal\media_responsive_thumbnail\Plugin\Field\FieldFormatter

Code

protected function needsEntityLoad(EntityReferenceItem $item) {
  return !$item
    ->hasNewEntity();
}