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