public function EntityDisplayInterface::getFormatter

Returns the Formatter plugin for a field.

Parameters

string $field_name: The field name.

Return value

\Drupal\field\Plugin\Type\Formatter\FormatterInterface If the field is not hidden, the Formatter plugin to use for rendering it.

1 method overrides EntityDisplayInterface::getFormatter()
EntityDisplay::getFormatter in drupal/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityDisplay.php
Returns the Formatter plugin for a field.

File

drupal/core/modules/entity/lib/Drupal/entity/EntityDisplayInterface.php, line 27
Contains \Drupal\entity\EntityDisplayInterface.

Class

EntityDisplayInterface
Provides an interface defining an entity display entity.

Namespace

Drupal\entity

Code

public function getFormatter($field_name);