forked from beastbytes/yii2-wizard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StepEvent.php
57 lines (55 loc) · 1.83 KB
/
StepEvent.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* StepEvent Class file
*
* @author Chris Yates
* @copyright Copyright © 2015 BeastBytes - All Rights Reserved
* @license BSD 3-Clause
* @package Wizard
*/
namespace beastbytes\wizard;
/**
* StepEvent class.
* Represents events raised while processing wizard steps.
*/
class StepEvent extends WizardEvent
{
/**
* @var mixed Branch directives for the step.
* These are set by the event handler and only processed if
* StepEvent::handled === TRUE
*/
public $branches;
/**
* @var integer Repetition index of the step
* WizardBehavior sets this value allowing the event handler to determine
* whether a step should be repeated
* @see $t
*/
public $n;
/**
* @var integer|string The next step to be processed.
* This is set by the event handler; it is only valid if
* StepEvent::handled === TRUE
* Integer values are:
* WizardBehavior::DIRECTION_FORWARD (default) - moves to the next step
* WizardBehavior::DIRECTION_BACKWARD - moves to the previous step (which may
* be an earlier repeated step). If WizardBehavior::forwardOnly === TRUE
* this results in an invalid step
* WizardBehavior::DIRECTION_REPEAT - repeats the current step to get another
* set of data
*
* If a string it is the name of the step to return to. This allows multiple
* steps to be repeated. If WizardBehavior::forward === TRUE this results in
* an invalid step. Note that WizardBehavior::autoAdvance must be FALSE to
* use this feature.
*/
public $nextStep = WizardBehavior::DIRECTION_FORWARD;
/**
* @var integer Total number of repetitions of the step
* WizardBehavior sets this value allowing the event handler to determine
* whether a step should be repeated
* @see $n
*/
public $t;
}