Class lispa\amos\wizflow\WizflowManager

Inheritancelispa\amos\wizflow\WizflowManager » yii\base\Object
Implementsyii\base\Configurable

Class WizflowManager Implement the Wizard UI design pattern using yii2-workflow.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$currentStep yii\base\Model|null The current step model instance or NULL if no current step is defined. lispa\amos\wizflow\WizflowManager
$nextStep yii\base\Model The new current step lispa\amos\wizflow\WizflowManager
$path array List of steps that have been performed until now lispa\amos\wizflow\WizflowManager
$previousStep yii\base\Model The new current step lispa\amos\wizflow\WizflowManager
$skeyName string Session key name used to store steps lispa\amos\wizflow\WizflowManager
$workflowBehavior array SimpleWorkflowBehavior configuration array attached to all wizard steps lispa\amos\wizflow\WizflowManager
$workflowBehaviorName string Name of the workflow behavior that is attached to all wizards steps lispa\amos\wizflow\WizflowManager
$workflowName string Name of the workflow lispa\amos\wizflow\WizflowManager
$workflowSource \raoul2000\workflow\source\IWorkflowSource The workflow source component instance lispa\amos\wizflow\WizflowManager
$workflowSourceName string Name of the workflow source component to use lispa\amos\wizflow\WizflowManager

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Object
__construct() Constructor. yii\base\Object
__get() Returns the value of an object property. yii\base\Object
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Object
__set() Sets value of an object property. yii\base\Object
__unset() Sets an object property to null. yii\base\Object
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Object
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Object
className() Returns the fully qualified name of this class. yii\base\Object
destroy() Clean up session data that may have been stored by this wizard. lispa\amos\wizflow\WizflowManager
getCurrentStep() Returns the model associated with the current wizard step. lispa\amos\wizflow\WizflowManager
getNextStep() Add the current step to the path and creates the next step form which becomes the new current step. lispa\amos\wizflow\WizflowManager
getPath() Returns an array containing all steps models that have been done until now. lispa\amos\wizflow\WizflowManager
getPreviousStep() Replace the current step, with the last step of the path and returns it. lispa\amos\wizflow\WizflowManager
getSavedModel() Retrieve a data saved in session lispa\amos\wizflow\WizflowManager
getWorkflowSource() Returns the workflow source component used by the manager lispa\amos\wizflow\WizflowManager
getWorkflowSourceName() Returns the name workflow source component to use. lispa\amos\wizflow\WizflowManager
hasCurrentStep() lispa\amos\wizflow\WizflowManager
hasMethod() Returns a value indicating whether a method is defined. yii\base\Object
hasProperty() Returns a value indicating whether a property is defined. yii\base\Object
init() Loads existing wizard data if available. lispa\amos\wizflow\WizflowManager
save() Save the wizard data into the current session lispa\amos\wizflow\WizflowManager
start() Initiate the wizard. lispa\amos\wizflow\WizflowManager
updateCurrentStep() Updates the current step with the model passed as argument. lispa\amos\wizflow\WizflowManager

Property Details

$currentStep public read-only property

The current step model instance or NULL if no current step is defined.

$nextStep public read-only property

The new current step

$path public read-only property

List of steps that have been performed until now

public array getPath ( )
$previousStep public read-only property

The new current step

$skeyName public property

Session key name used to store steps

public string $skeyName '_wiz'
$workflowBehavior public property

SimpleWorkflowBehavior configuration array attached to all wizard steps

public array $workflowBehavior = ['class' => '\raoul2000\workflow\base\SimpleWorkflowBehavior''defaultWorkflowId' => 'Wizflow']
$workflowBehaviorName public property

Name of the workflow behavior that is attached to all wizards steps

public string $workflowBehaviorName 'wizflowBehavior'
$workflowName public property

Name of the workflow

public string $workflowName ''
$workflowSource public read-only property

The workflow source component instance

public \raoul2000\workflow\source\IWorkflowSource getWorkflowSource ( )
$workflowSourceName public read-only property

Name of the workflow source component to use

Method Details

destroy() public method

Clean up session data that may have been stored by this wizard.

public void destroy ( )
getCurrentStep() public method

Returns the model associated with the current wizard step.

public yii\base\Model|null getCurrentStep ( )
return yii\base\Model|null

The current step model instance or NULL if no current step is defined.

getNextStep() public method

Add the current step to the path and creates the next step form which becomes the new current step.

public yii\base\Model getNextStep ( )
return yii\base\Model

The new current step

getPath() public method

Returns an array containing all steps models that have been done until now.

The current step is not included in the returned array.

public array getPath ( )
return array

List of steps that have been performed until now

getPreviousStep() public method

Replace the current step, with the last step of the path and returns it.

public yii\base\Model getPreviousStep ( )
return yii\base\Model

The new current step

getSavedModel() public method

Retrieve a data saved in session

example: getSavedModel('Workflow/STEP3')

public \lispa\amos\wizflow\null, getSavedModel ( $workFlowId )
$workFlowId
return \lispa\amos\wizflow\null,

Model data

getWorkflowSource() public method

Returns the workflow source component used by the manager

public \raoul2000\workflow\source\IWorkflowSource getWorkflowSource ( )
return \raoul2000\workflow\source\IWorkflowSource

The workflow source component instance

getWorkflowSourceName() public method

Returns the name workflow source component to use.

Note that the component must be available and registred in the Yii::$app container.

public string getWorkflowSourceName ( )
return string

The name of the workflow source component

hasCurrentStep() public method

public boolean hasCurrentStep ( )
return boolean

TRUE if the wizard process as started (i.e. a current step is available) FALSE otherwise.

init() public method

Loads existing wizard data if available.

See also yii\base\Object::init().

public void init ( )
save() public method

Save the wizard data into the current session

public void save ( )
start() public method

Initiate the wizard.

This method reset the existing wizard path and returns the model for the first step.

public yii\base\Model start ( )
return yii\base\Model

The model for the first step

updateCurrentStep() public method

Updates the current step with the model passed as argument.

public void updateCurrentStep ( $model )
$model yii\base\Model
throws yii\base\Exception