function ListDataDefinition::__construct

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

Overrides DataDefinition::__construct

File

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

Class

ListDataDefinition
A typed data definition class for defining lists.

Namespace

Drupal\Core\TypedData

Code

public function __construct(array $values = [], ?DataDefinitionInterface $item_definition = NULL) {
    $this->definition = $values;
    $this->itemDefinition = $item_definition;
}

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