PHP Class raoul2000\workflow\validation\WorkflowValidator

Author: raoul
Inheritance: extends yii\validators\Validator
ファイルを表示 Open project: raoul2000/yii2-workflow

Public Properties

Property Type Description
$skipOnEmpty Overloads the default initialization value because by default, we want to run the validation even if the status attribute is null (which is considered as a 'leaveWorkflow' event).

Public Methods

Method Description
validateAttribute ( $object, $attribute ) Apply active validators for the current workflow event sequence.

Private Methods

Method Description
_isActiveValidator ( Validator $validator, $currentScenario ) : boolean Checks if a validator is active for the workflow event passed as argument.

Method Details

validateAttribute() public method

If a workflow event sequence is about to occur, this method scan all validators defined in the owner model, and applies the ones which are compatibles for the upcomming events.
See also: raoul2000\workflow\events\IEventSequence
public validateAttribute ( $object, $attribute )

Property Details

$skipOnEmpty public_oe property

Overloads the default initialization value because by default, we want to run the validation even if the status attribute is null (which is considered as a 'leaveWorkflow' event).
public $skipOnEmpty