Same name and namespace in other branches
  1. 2.x src/EntityClone/EntityCloneInterface.php \Drupal\entity_clone\EntityClone\EntityCloneInterface::cloneEntity()

Clone an entity.

Paramètres

\Drupal\Core\Entity\EntityInterface $entity: The entity.

\Drupal\Core\Entity\EntityInterface $cloned_entity: The cloned entity.

array $properties: All new properties to replace old.

Return value

\Drupal\Core\Entity\EntityInterface The new saved entity.

2 methods override EntityCloneInterface::cloneEntity()
ConfigEntityCloneBase::cloneEntity dans src/EntityClone/Config/ConfigEntityCloneBase.php
Clone an entity.
ContentEntityCloneBase::cloneEntity dans src/EntityClone/Content/ContentEntityCloneBase.php
Clone an entity.

Fichier

src/EntityClone/EntityCloneInterface.php, line 25

Classe

EntityCloneInterface
Defines a common interface for all entity clone objects.

Namespace

Drupal\entity_clone\EntityClone

Code

public function cloneEntity(EntityInterface $entity, EntityInterface $cloned_entity, array $properties = []);