function FieldableEntityInterface::get
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/FieldableEntityInterface.php \Drupal\Core\Entity\FieldableEntityInterface::get()
- 10 core/lib/Drupal/Core/Entity/FieldableEntityInterface.php \Drupal\Core\Entity\FieldableEntityInterface::get()
- 11.x 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.
File
-
core/
lib/ Drupal/ Core/ Entity/ FieldableEntityInterface.php, line 151
Class
- FieldableEntityInterface
- Interface for entities having fields.
Namespace
Drupal\Core\EntityCode
public function get($field_name);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.