function FormatterBase::prepareView

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/FormatterBase.php \Drupal\Core\Field\FormatterBase::prepareView()
  2. 8.9.x core/lib/Drupal/Core/Field/FormatterBase.php \Drupal\Core\Field\FormatterBase::prepareView()
  3. 10 core/lib/Drupal/Core/Field/FormatterBase.php \Drupal\Core\Field\FormatterBase::prepareView()

Overrides FormatterInterface::prepareView

2 methods override FormatterBase::prepareView()
EntityReferenceFormatterBase::prepareView in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php
Loads the entities referenced in that field across all the entities being viewed.
TestFieldPrepareViewFormatter::prepareView in core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldPrepareViewFormatter.php
Allows formatters to load information for field values being displayed.

File

core/lib/Drupal/Core/Field/FormatterBase.php, line 148

Class

FormatterBase
Base class for 'Field formatter' plugin implementations.

Namespace

Drupal\Core\Field

Code

public function prepareView(array $entities_items) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.