function ListDataDefinition::createFromDataType
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::createFromDataType()
- 8.9.x core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::createFromDataType()
- 11.x core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::createFromDataType()
Overrides DataDefinition::createFromDataType
File
-
core/
lib/ Drupal/ Core/ TypedData/ ListDataDefinition.php, line 33
Class
- ListDataDefinition
- A typed data definition class for defining lists.
Namespace
Drupal\Core\TypedDataCode
public static function createFromDataType($type) {
$definition = parent::createFromDataType($type);
// If nothing else given, default to a list of 'any' items.
$definition->itemDefinition = DataDefinition::create('any');
return $definition;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.