Same name in other branches
- 2.x entity_clone.api.php \MyEntityCloneEventSubscriber::myPostClone()
An example event subscriber.
Dispatched after an entity is cloned and saved.
See also
\Drupal\entity_clone\Event\EntityCloneEvents::POST_CLONE
File
-
./
entity_clone.api.php, line 57
Class
- MyEntityCloneEventSubscriber
- Event subscribers for Entity Clone.
Code
public function myPostClone(EntityCloneEvent $event) : void {
$original = $event->getEntity();
$newEntity = $event->getClonedEntity();
}