Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/ListInterface.php \Drupal\Core\TypedData\ListInterface::get()
  2. 9 core/lib/Drupal/Core/TypedData/ListInterface.php \Drupal\Core\TypedData\ListInterface::get()

Returns the item at the specified position in this list.

Parameters

int $index: Index of the item to return.

Return value

\Drupal\Core\TypedData\TypedDataInterface|null The item at the specified position in this list, or NULL if no item exists at that position.

Throws

\Drupal\Core\TypedData\Exception\MissingDataException If the complex data structure is unset and no item can be created.

1 call to ListInterface::get()
CommentFieldItemList::get in core/modules/comment/src/CommentFieldItemList.php
Returns the item at the specified position in this list.
2 methods override ListInterface::get()
CommentFieldItemList::get in core/modules/comment/src/CommentFieldItemList.php
Returns the item at the specified position in this list.
ModerationStateFieldItemList::get in core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php
Returns the item at the specified position in this list.

File

core/lib/Drupal/Core/TypedData/ListInterface.php, line 57

Class

ListInterface
Interface for a list of typed data.

Namespace

Drupal\Core\TypedData

Code

public function get($index);