You are here

protected function OrbitMediaFormatter::needsEntityLoad in ZURB Orbit 8

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 FileFormatterBase::needsEntityLoad

File

src/Plugin/Field/FieldFormatter/OrbitMediaFormatter.php, line 87

Class

OrbitMediaFormatter
Plugin implementation of the 'Orbit' formatter.

Namespace

Drupal\field_orbit\Plugin\Field\FieldFormatter

Code

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