function ItemList::first

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::first()
  2. 8.9.x core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::first()
  3. 11.x core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::first()

Overrides ListInterface::first

5 calls to ItemList::first()
FieldItemList::applyDefaultValue in core/lib/Drupal/Core/Field/FieldItemList.php
Applies the default value.
FieldItemList::__get in core/lib/Drupal/Core/Field/FieldItemList.php
Magic method: Gets a property value of to the first field item.
FieldItemList::__isset in core/lib/Drupal/Core/Field/FieldItemList.php
Magic method: Determines whether a property of the first field item is set.
FieldItemList::__set in core/lib/Drupal/Core/Field/FieldItemList.php
Magic method: Sets a property value of the first field item.
FieldItemList::__unset in core/lib/Drupal/Core/Field/FieldItemList.php
Magic method: Unsets a property of the first field item.

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php, line 166

Class

ItemList
A generic list class.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function first() {
    return $this->get(0);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.