public EntityViewBuilderInterface::viewFieldItem(FieldItemInterface $item, $display_options = array())
Builds a renderable array for a single field item.
Parameters
\Drupal\Core\Field\FieldItemInterface $item: FieldItem to be displayed.
string|array $display_options: Can be either the name of a view mode, or an array of display settings. See EntityViewBuilderInterface::viewField() for more information.
Return value
array A renderable array for the field item.
See also
\Drupal\Core\Entity\EntityViewBuilderInterface::viewField()
File
- core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php, line 141
Class
- EntityViewBuilderInterface
- Defines an interface for entity view builders.
Namespace
Drupal\Core\Entity
Code
public function viewFieldItem(FieldItemInterface $item, $display_options = array());
Please login to continue.