You are here

public function FFTFormatter::prepareView in Field Formatter Template 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/FFTFormatter.php \Drupal\fft\Plugin\Field\FieldFormatter\FFTFormatter::prepareView()

Loads the entities referenced in that field across all the entities being viewed.

Overrides EntityReferenceFormatterBase::prepareView

File

src/Plugin/Field/FieldFormatter/FFTFormatter.php, line 161

Class

FFTFormatter
Plugin implementation of the 'fft_formatter' formatter.

Namespace

Drupal\fft\Plugin\Field\FieldFormatter

Code

public function prepareView(array $entities_items) {
  $field_type = $this->fieldDefinition
    ->getType();
  if (!$this
    ->isReference($field_type)) {
    return;
  }
  parent::prepareView($entities_items);
}