function TypedDataManager::createListDataDefinition
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/TypedDataManager.php \Drupal\Core\TypedData\TypedDataManager::createListDataDefinition()
- 10 core/lib/Drupal/Core/TypedData/TypedDataManager.php \Drupal\Core\TypedData\TypedDataManager::createListDataDefinition()
- 11.x core/lib/Drupal/Core/TypedData/TypedDataManager.php \Drupal\Core\TypedData\TypedDataManager::createListDataDefinition()
Overrides TypedDataManagerInterface::createListDataDefinition
File
-
core/
lib/ Drupal/ Core/ TypedData/ TypedDataManager.php, line 132
Class
- TypedDataManager
- Manages data type plugins.
Namespace
Drupal\Core\TypedDataCode
public function createListDataDefinition($item_type) {
$type_definition = $this->getDefinition($item_type);
if (!isset($type_definition)) {
throw new \InvalidArgumentException("Invalid data type '{$item_type}' has been given");
}
$class = $type_definition['list_definition_class'];
return $class::createFromItemType($item_type);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.