Skip to content

Instantly share code, notes, and snippets.

@raoul2000
Created June 27, 2015 15:47
Show Gist options
  • Save raoul2000/7d72b08226a532e31a60 to your computer and use it in GitHub Desktop.
Save raoul2000/7d72b08226a532e31a60 to your computer and use it in GitHub Desktop.
Defines the wizard steps
<?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