This repository was archived by the owner on Aug 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathWizardEvent.php
More file actions
54 lines (51 loc) · 1.71 KB
/
WizardEvent.php
File metadata and controls
54 lines (51 loc) · 1.71 KB
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
<?php
/**
* WizardEvent Class file
*
* @author Chris Yates
* @copyright Copyright © 2015 BeastBytes - All Rights Reserved
* @license BSD 3-Clause
* @package Wizard
*/
namespace beastbytes\wizard;
use yii\base\Event;
/**
* WizardEvent class.
* Represents events raised by WizardBehavior.
*/
class WizardEvent extends Event
{
/**
* @var boolean Whether the wizard can continue to run
* An event handler can set this to FALSE to end the wizard.
*
* The following summarises what happens if it is set TRUE for the types of
* events:
* - beforeWizard - the wizard starts and moves to the first step
* wizardStep - if Event::handled === FALSE the wizard returns Event::data.
* If Event::handled === TRUE the wizard saves Event::data and moves to the
* next step
* - afterwizard - the wizard clears all data collected and resets
*
* The following summarises what happens if it is set FALSE for the types of
* events:
* - beforeWizard - the wizard ends; an `afterWizard` event is raised with
* WizardEvent::step = FALSE
* - wizardStep - the wizard ends; an `afterWizard` event is raised with
* StepEvent::step = <currentStep> if StepEvent::handled === TRUE, or
* StepEvent::step = NULL if StepEvent::handled === FALSE
* - afterwizard - the wizard does not clear the data collected or reset
*/
public $continue = true;
/**
* @var boolean|null|string
* boolean: TRUE if all steps were completed, FALSE if no steps were processed
* NULL: The wizard was cancelled
* string: Name of the step that raised the event
*/
public $step;
/**
* @var mixed Step data
*/
public $stepData;
}