diff -u b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php --- b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php +++ b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php @@ -28,14 +28,14 @@ $data_type .= ":{$bundle}"; } - // If the definition doesn't exist, just create from defaults. + // Load definitions created by the EntityDeriver. $values = \Drupal::typedDataManager()->getDefinition($data_type, FALSE); $definition = new static(is_array($values) ? $values : []); - // Set the passed entity type. + // Set the EntityType constraint using the given entity type ID. $definition->setEntityTypeId($entity_type_id); - // Set the passed bundle, if it was given. + // If available, set the Bundle constraint. if ($bundle) { $definition->setBundles([$bundle]); }