public function ListInterface::get in Drupal 9
Same name and namespace in other branches
- 8 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 method overrides ListInterface::get()
- ItemList::get in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ ItemList.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\TypedDataCode
public function get($index);