Skip to content
Snippets Groups Projects

Edit CloneLayoutBlockForm.php

1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -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.
Loading