Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldItemInterface.php

function FieldItemInterface::view

Returns a renderable array for a single field item.

Parameters

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()

\Drupal\Core\Entity\EntityViewBuilderInterface::viewFieldItem()

\Drupal\Core\Field\FieldItemListInterface::view()

1 method overrides FieldItemInterface::view()
FieldItemBase::view in core/lib/Drupal/Core/Field/FieldItemBase.php
Returns a renderable array for a single field item.

File

core/lib/Drupal/Core/Field/FieldItemInterface.php, line 179

Class

FieldItemInterface
Interface for entity field items.

Namespace

Drupal\Core\Field

Code

public function view($display_options = []);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal