You are here

public function FieldableEntityInterface::get in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/FieldableEntityInterface.php \Drupal\Core\Entity\FieldableEntityInterface::get()

Gets a field item list.

Parameters

string $field_name: The name of the field to get; e.g., 'title' or 'name'.

Return value

\Drupal\Core\Field\FieldItemListInterface The field item list, containing the field items.

Throws

\InvalidArgumentException If an invalid field name is given.

1 method overrides FieldableEntityInterface::get()
ContentEntityBase::get in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Gets a field item list.

File

core/lib/Drupal/Core/Entity/FieldableEntityInterface.php, line 156
Contains \Drupal\Core\Entity\FieldableEntityInterface.

Class

FieldableEntityInterface
Interface for entities having fields.

Namespace

Drupal\Core\Entity

Code

public function get($field_name);