public static EntityDataDefinition::create($entity_type_id = NULL)
Creates a new entity definition.
Parameters
string $entity_type_id: (optional) The ID of the entity type, or NULL if the entity type is unknown. Defaults to NULL.
Return value
static
Overrides DataDefinition::create
File
- core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php, line 21
Class
- EntityDataDefinition
- A typed data definition class for describing entities.
Namespace
Drupal\Core\Entity\TypedData
Code
public static function create($entity_type_id = NULL) { $definition = new static(array()); // Set the passed entity type. if (isset($entity_type_id)) { $definition->setEntityTypeId($entity_type_id); } return $definition; }
Please login to continue.