protected function PhotosAlbumFormatter::needsEntityLoad in Album Photos 8.5
Same name and namespace in other branches
- 6.0.x src/Plugin/Field/FieldFormatter/PhotosAlbumFormatter.php \Drupal\photos\Plugin\Field\FieldFormatter\PhotosAlbumFormatter::needsEntityLoad()
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 EntityReferenceFormatterBase::needsEntityLoad
File
- src/
Plugin/ Field/ FieldFormatter/ PhotosAlbumFormatter.php, line 99
Class
- PhotosAlbumFormatter
- Plugin implementation of the 'media_thumbnail' formatter.
Namespace
Drupal\photos\Plugin\Field\FieldFormatterCode
protected function needsEntityLoad(EntityReferenceItem $item) {
return !$item
->hasNewEntity();
}