function EntityInterface::createDuplicate

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

File

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

Class

EntityInterface
Defines a common interface for all entity objects.

Namespace

Drupal\Core\Entity

Code

public function createDuplicate();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.