public function createChangeStatusSequence($transition, $sender)
	{
		$config = [
			'start'      => $transition->getStartStatus(),
			'end'  		 => $transition->getEndStatus(),
			'transition' => $transition,
			'sender'  	 => $sender
		];
		return [

			////////// BEFORE //////////////////////////////////////////////////////////////

			'before' => [
				new WorkflowEvent(
					WorkflowEvent::beforeLeaveStatus(),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeLeaveStatus($transition->getStartStatus()->getId()),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeChangeStatus($transition->getStartStatus()->getId(), $transition->getEndStatus()->getId()),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeEnterStatus(),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeEnterStatus($transition->getEndStatus()->getId()),
					$config
				)
			],

			////////// AFTER //////////////////////////////////////////////////////////////

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

			////////// BEFORE //////////////////////////////////////////////////////////////

			'before' => [
				new WorkflowEvent(
					WorkflowEvent::beforeLeaveStatus(),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeLeaveStatus($transition->getStartStatus()->getId()),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeChangeStatus($transition->getStartStatus()->getId(), $transition->getEndStatus()->getId()),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeEnterStatus(),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::beforeEnterStatus($transition->getEndStatus()->getId()),
					$config
				)
			],

			////////// AFTER //////////////////////////////////////////////////////////////

			'after' => [
				new WorkflowEvent(
					WorkflowEvent::afterLeaveStatus(),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::afterLeaveStatus($transition->getStartStatus()->getId()),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::afterChangeStatus($transition->getStartStatus()->getId(), $transition->getEndStatus()->getId()),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::afterEnterStatus(),
					$config
				),
				new WorkflowEvent(
					WorkflowEvent::afterEnterStatus($transition->getEndStatus()->getId()),
					$config
				)
			]
		];
	}
public function createChangeStatusSequence ( $ transition , $ sender ) { $ config = [ 'start' => $ transition -> getStartStatus ( ) , 'end' => $ transition -> getEndStatus ( ) , 'transition' => $ transition , 'sender' => $ sender ] ; return [ ////////// BEFORE ////////////////////////////////////////////////////////////// 'before' => [ new WorkflowEvent ( WorkflowEvent :: beforeLeaveStatus ( ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: beforeLeaveStatus ( $ transition -> getStartStatus ( ) -> getId ( ) ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: beforeChangeStatus ( $ transition -> getStartStatus ( ) -> getId ( ) , $ transition -> getEndStatus ( ) -> getId ( ) ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: beforeEnterStatus ( ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: beforeEnterStatus ( $ transition -> getEndStatus ( ) -> getId ( ) ) , $ config ) ] , ////////// AFTER ////////////////////////////////////////////////////////////// 'after' => [ new WorkflowEvent ( WorkflowEvent :: afterLeaveStatus ( ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: afterLeaveStatus ( $ transition -> getStartStatus ( ) -> getId ( ) ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: afterChangeStatus ( $ transition -> getStartStatus ( ) -> getId ( ) , $ transition -> getEndStatus ( ) -> getId ( ) ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: afterEnterStatus ( ) , $ config ) , new WorkflowEvent ( WorkflowEvent :: afterEnterStatus ( $ transition -> getEndStatus ( ) -> getId ( ) ) , $ config ) ] ] ; }
Produces the following event sequence when a model changes from status A to status B.

- beforeLeaveStatus(*)
- beforeLeaveStatus(A)
- beforeChangeStatusFrom(A)to(B)
- beforeEnterStatus(*)
- beforeEnterStatus(B)

- afterLeaveStatus(*)
- afterLeaveStatus(A)
- afterChangeStatusFrom(A)to(B)
- afterEnterStatus(*)
- afterEnterStatus(B)

@see \raoul2000\workflow\events\IEventSequence::createChangeStatusSequence()
Produces the following event sequence when a model changes from status A to status B .