Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::createDuplicate()
  2. 9 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.

1 call to EntityInterface::createDuplicate()
BlockContent::createDuplicate in core/modules/block_content/src/Entity/BlockContent.php
Creates a duplicate of the entity.
2 methods override EntityInterface::createDuplicate()
BlockContent::createDuplicate in core/modules/block_content/src/Entity/BlockContent.php
Creates a duplicate of the entity.
EntityBase::createDuplicate in core/lib/Drupal/Core/Entity/EntityBase.php
Creates a duplicate of the entity.

File

core/lib/Drupal/Core/Entity/EntityInterface.php, line 339

Class

EntityInterface
Defines a common interface for all entity objects.

Namespace

Drupal\Core\Entity

Code

public function createDuplicate();