function SelectionWithAutocreateInterface::createNewEntity
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionWithAutocreateInterface.php \Drupal\Core\Entity\EntityReferenceSelection\SelectionWithAutocreateInterface::createNewEntity()
- 10 core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionWithAutocreateInterface.php \Drupal\Core\Entity\EntityReferenceSelection\SelectionWithAutocreateInterface::createNewEntity()
- 11.x core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionWithAutocreateInterface.php \Drupal\Core\Entity\EntityReferenceSelection\SelectionWithAutocreateInterface::createNewEntity()
Creates a new entity object that can be used as a valid reference.
Parameters
string $entity_type_id: The entity type ID.
string $bundle: The bundle name.
string $label: The entity label.
int $uid: The entity owner ID, if the entity type supports it.
Return value
\Drupal\Core\Entity\EntityInterface An unsaved entity object.
1 method overrides SelectionWithAutocreateInterface::createNewEntity()
- DefaultSelection::createNewEntity in core/
lib/ Drupal/ Core/ Entity/ Plugin/ EntityReferenceSelection/ DefaultSelection.php - Creates a new entity object that can be used as a valid reference.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityReferenceSelection/ SelectionWithAutocreateInterface.php, line 29
Class
- SelectionWithAutocreateInterface
- Interface for Selection plugins that support newly created entities.
Namespace
Drupal\Core\Entity\EntityReferenceSelectionCode
public function createNewEntity($entity_type_id, $bundle, $label, $uid);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.