public static DataDefinition::create($type)
Creates a new data definition.
Parameters
string $type: The data type of the data; e.g., 'string', 'integer' or 'any'.
Return value
static A new DataDefinition object.
File
- core/lib/Drupal/Core/TypedData/DataDefinition.php, line 26
Class
- DataDefinition
- A typed data definition class for defining data based on defined data types.
Namespace
Drupal\Core\TypedData
Code
public static function create($type) { $definition['type'] = $type; return new static($definition); }
Please login to continue.