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

Appends a new item to the list.

Parameters

mixed $value: The value of the new item.

Return value

\Drupal\Core\TypedData\TypedDataInterface The item that was appended.

4 calls to ListInterface::appendItem()
CommentFieldItemList::get in core/modules/comment/src/CommentFieldItemList.php
Returns the item at the specified position in this list.
FieldItemList::applyDefaultValue in core/lib/Drupal/Core/Field/FieldItemList.php
Applies the default value.
FieldItemList::__set in core/lib/Drupal/Core/Field/FieldItemList.php
Magic method: Sets a property value of the first field item.
LayoutSectionItemList::setSections in core/modules/layout_builder/src/Field/LayoutSectionItemList.php
Stores the information for all sections.

File

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

Class

ListInterface
Interface for a list of typed data.

Namespace

Drupal\Core\TypedData

Code

public function appendItem($value = NULL);