protected function BlazyFileFormatterBase::needsEntityLoad in Blazy 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/BlazyFileFormatterBase.php \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyFileFormatterBase::needsEntityLoad()
Overrides parent::needsEntityLoad().
One step back to have both image and file ER plugins extend this, because EntityReferenceItem::isDisplayed() doesn't exist, except for ImageItem which is always TRUE anyway for type image and file ER.
Overrides FileFormatterBase::needsEntityLoad
File
- src/
Plugin/ Field/ FieldFormatter/ BlazyFileFormatterBase.php, line 123
Class
- BlazyFileFormatterBase
- Base class for blazy/slick image, and file ER formatters.
Namespace
Drupal\blazy\Plugin\Field\FieldFormatterCode
protected function needsEntityLoad(EntityReferenceItem $item) {
return !$item
->hasNewEntity();
}