SelectionWithAutocreateInterface::createNewEntity

public SelectionWithAutocreateInterface::createNewEntity($entity_type_id, $bundle, $label, $uid)

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.

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\EntityReferenceSelection

Code

public function createNewEntity($entity_type_id, $bundle, $label, $uid);
doc_Drupal
2016-10-29 09:41:47
Comments
Leave a Comment

Please login to continue.