public TypedDataManager::createListDataDefinition($item_type)
Creates a new list data definition for items of the given data type.
string $item_type: The item type, for which a list data definition should be created.
\Drupal\Core\TypedData\ListDataDefinitionInterface A list definition for items of the given data type.
Overrides TypedDataManagerInterface::createListDataDefinition
\Drupal\Core\TypedData\TypedDataManager::createDataDefinition()
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); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!TypedDataManager.php/function/TypedDataManager::createListDataDefinition/8.1.x