Same name in other branches
- 2.x entity_clone.api.php \MyEntityCloneEventSubscriber::myPreClone()
An example event subscriber.
Dispatched before an entity is cloned and saved.
Voir aussi
\Drupal\entity_clone\Event\EntityCloneEvents::PRE_CLONE
Fichier
-
./
entity_clone.api.php, line 45
Classe
- MyEntityCloneEventSubscriber
- Event subscribers for Entity Clone.
Code
public function myPreClone(EntityCloneEvent $event) : void {
$original = $event->getEntity();
$newEntity = $event->getClonedEntity();
}