Class lispa\amos\wizflow\WizflowManager
Inheritance | lispa\amos\wizflow\WizflowManager » yii\base\Object |
---|---|
Implements | yii\base\Configurable |
Class WizflowManager Implement the Wizard UI design pattern using yii2-workflow.
Public Properties
Property | Type | Description | Defined 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
Method | Description | Defined 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
The current step model instance or NULL if no current step is defined.
The new current step
List of steps that have been performed until now
The new current step
Session key name used to store steps
SimpleWorkflowBehavior configuration array attached to all wizard steps
Name of the workflow behavior that is attached to all wizards steps
Name of the workflow
The workflow source component instance
Name of the workflow source component to use
Method Details
Clean up session data that may have been stored by this wizard.
public void destroy ( ) |
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. |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
public boolean hasCurrentStep ( ) | ||
return | boolean | TRUE if the wizard process as started (i.e. a current step is available) FALSE otherwise. |
---|
Loads existing wizard data if available.
See also yii\base\Object::init().
public void init ( ) |
Save the wizard data into the current session
public void save ( ) |
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 |
---|
Updates the current step with the model passed as argument.
public void updateCurrentStep ( $model ) | ||
$model | yii\base\Model | |
throws | yii\base\Exception |
---|