function ItemList::offsetSet

Attributes

#[\ReturnTypeWillChange]

File

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

Class

ItemList
A generic list class.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function offsetSet($offset, $value) {
  if (!isset($offset)) {
    // The [] operator has been used.
    $this->appendItem($value);
  }
  else {
    $this->set($offset, $value);
  }
}

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