public function EntityInterface::createDuplicate in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::createDuplicate()
- 10 core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::createDuplicate()
Creates a duplicate of the entity.
Return value
static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system.
2 methods override EntityInterface::createDuplicate()
- EntityBase::createDuplicate in core/
lib/ Drupal/ Core/ Entity/ EntityBase.php - Creates a duplicate of the entity.
- ViewUI::createDuplicate in core/
modules/ views_ui/ src/ ViewUI.php - Creates a duplicate of the entity.
File
- core/
lib/ Drupal/ Core/ Entity/ EntityInterface.php, line 337
Class
- EntityInterface
- Defines a common interface for all entity objects.
Namespace
Drupal\Core\EntityCode
public function createDuplicate();