protected function AutoImageStyleMediaDefault::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/ AutoImageStyleMediaDefault.php, line 124
Class
- AutoImageStyleMediaDefault
- Plugin for responsive media image formatter.
Namespace
Drupal\auto_image_style\Plugin\Field\FieldFormatterCode
protected function needsEntityLoad(EntityReferenceItem $item) {
return !$item
->hasNewEntity();
}