StateMachineStateChangeEvent example

$this->eventDispatcher->dispatch(
                new StateMachineTransitionEvent(
                    $transition->getEntityName(),
                    $transition->getEntityId(),
                    $fromPlace,
                    $toPlace,
                    $context
                )
            );

            $leaveEvent = new StateMachineStateChangeEvent(
                $context,
                StateMachineStateChangeEvent::STATE_MACHINE_TRANSITION_SIDE_LEAVE,
                $transition,
                $stateMachine,
                $fromPlace,
                $toPlace
            );

            $this->eventDispatcher->dispatch(
                $leaveEvent,
                $leaveEvent->getName()
            );
Home | Imprint | This part of the site doesn't use cookies.