Created
June 27, 2015 15:47
-
-
Save raoul2000/7d72b08226a532e31a60 to your computer and use it in GitHub Desktop.
Defines the wizard steps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\models\wizflow; | |
use raoul2000\workflow\source\file\IWorkflowDefinitionProvider; | |
class Wizflow implements IWorkflowDefinitionProvider | |
{ | |
public function getDefinition() | |
{ | |
return [ | |
'initialStatusId' => 'welcome', | |
'status' => [ | |
'welcome' => [ | |
'transition' => ['step1'], | |
'metadata' => [ | |
'model' => [ | |
'class' => '\app\models\wizflow\WelcomeForm' | |
], | |
'view' =>'step-welcome' | |
] | |
], | |
'step1' => [ | |
'transition' => ['blue','green'], | |
'metadata' => [ | |
'model' => [ | |
'class' => '\app\models\wizflow\Step1Form' | |
], | |
'view' =>'step-1' | |
] | |
], | |
'blue' => [ | |
'transition' => ['final'], | |
'metadata' => [ | |
'model' => [ | |
'class' => '\app\models\wizflow\BlueForm' | |
], | |
'view' =>'step-blue' | |
] | |
], | |
'green' => [ | |
'transition' => ['final'], | |
'metadata' => [ | |
'model' => [ | |
'class' => '\app\models\wizflow\GreenForm' | |
], | |
'view' =>'step-green' | |
] | |
], | |
'final' => [ | |
'transition' => [], | |
'metadata' => [ | |
'model' => [ | |
'class' => '\app\models\wizflow\FinalForm' | |
], | |
'view' =>'step-final' | |
] | |
] | |
] | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment