public function createChangeStatusSequence($transition, $sender)
{
$config = ['start' => $transition->getStartStatus(), 'end' => $transition->getEndStatus(), 'transition' => $transition, 'sender' => $sender];
return ['before' => [new WorkflowEvent(WorkflowEvent::beforeLeaveStatus($transition->getStartStatus()->getId()), $config), new WorkflowEvent(WorkflowEvent::beforeChangeStatus($transition->getStartStatus()->getId(), $transition->getEndStatus()->getId()), $config), new WorkflowEvent(WorkflowEvent::beforeEnterStatus($transition->getEndStatus()->getId()), $config)], 'after' => [new WorkflowEvent(WorkflowEvent::afterLeaveStatus($transition->getStartStatus()->getId()), $config), new WorkflowEvent(WorkflowEvent::afterChangeStatus($transition->getStartStatus()->getId(), $transition->getEndStatus()->getId()), $config), new WorkflowEvent(WorkflowEvent::afterEnterStatus($transition->getEndStatus()->getId()), $config)]];
}