function DataDefinition::createFromDataType

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::createFromDataType()
  2. 10 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::createFromDataType()
  3. 11.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::createFromDataType()

Overrides DataDefinitionInterface::createFromDataType

2 calls to DataDefinition::createFromDataType()
ListDataDefinition::createFromDataType in core/lib/Drupal/Core/TypedData/ListDataDefinition.php
Creates a new data definition object.
PrimitiveDataNormalizerTest::dataProviderPrimitiveData in core/modules/serialization/tests/src/Unit/Normalizer/PrimitiveDataNormalizerTest.php
Data provider for testNormalize().
5 methods override DataDefinition::createFromDataType()
DataReferenceDefinition::createFromDataType in core/lib/Drupal/Core/TypedData/DataReferenceDefinition.php
Creates a new data definition object.
EntityDataDefinition::createFromDataType in core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php
Creates a new data definition object.
FieldItemDataDefinition::createFromDataType in core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php
Creates a new data definition object.
ListDataDefinition::createFromDataType in core/lib/Drupal/Core/TypedData/ListDataDefinition.php
Creates a new data definition object.
MapDataDefinition::createFromDataType in core/lib/Drupal/Core/TypedData/MapDataDefinition.php
Creates a new data definition object.

File

core/lib/Drupal/Core/TypedData/DataDefinition.php, line 36

Class

DataDefinition
A typed data definition class for defining data based on defined data types.

Namespace

Drupal\Core\TypedData

Code

public static function createFromDataType($type) {
    return self::create($type);
}

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