diff --git a/src/Form/CloneLayoutBlockForm.php b/src/Form/CloneLayoutBlockForm.php index e18fa0d4af1bf0841f7c2ade74ebea697dccac37..6ccfd177cdf70d0aff78c699fc56836397e8159a 100644 --- a/src/Form/CloneLayoutBlockForm.php +++ b/src/Form/CloneLayoutBlockForm.php @@ -310,9 +310,9 @@ class CloneLayoutBlockForm extends ConfirmFormBase { // If entity clone module is used dispatch events and clone via handler. if($entity_clone) { - $this->eventDispatcher->dispatch(EntityCloneEvents::PRE_CLONE, new EntityCloneEvent($entity, $cloned_entity, $properties)); + $this->eventDispatcher->dispatch( new EntityCloneEvent($entity, $cloned_entity, $properties),EntityCloneEvents::PRE_CLONE); $cloned_entity = $entity_clone_handler->cloneEntity($entity, $cloned_entity, $properties); - $this->eventDispatcher->dispatch(EntityCloneEvents::POST_CLONE, new EntityCloneEvent($entity, $cloned_entity, $properties)); + $this->eventDispatcher->dispatch( new EntityCloneEvent($entity, $cloned_entity, $properties),EntityCloneEvents::POST_CLONE); } // Set new subject to duplicated eck.