You are here

protected function AutoImageStyleMediaResponsive::needsEntityLoad in Auto image style 8

This has to be overriden 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/AutoImageStyleMediaResponsive.php, line 128

Class

AutoImageStyleMediaResponsive
Plugin for responsive media image formatter.

Namespace

Drupal\auto_image_style\Plugin\Field\FieldFormatter

Code

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