function ListDataDefinition::setItemDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::setItemDefinition()
  2. 10 core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::setItemDefinition()
  3. 11.x core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::setItemDefinition()

Sets the item definition.

Parameters

\Drupal\Core\TypedData\DataDefinition $definition: A list item's data definition.

Return value

$this

File

core/lib/Drupal/Core/TypedData/ListDataDefinition.php, line 104

Class

ListDataDefinition
A typed data definition class for defining lists.

Namespace

Drupal\Core\TypedData

Code

public function setItemDefinition(DataDefinitionInterface $definition) {
    $this->itemDefinition = $definition;
    return $this;
}

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