public function SelectionWithAutocreateInterface::createNewEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 34 - Contains \Drupal\Core\Entity\EntityReferenceSelection\SelectionWithAutocreateInterface.
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);