yii2-workflow Class Reference
  • Namespace
  • Class

Namespaces

  • raoul2000
    • workflow
      • actions
      • base
      • events
      • helpers
      • source
        • file
      • validation

Classes

  • WorkflowScenario
  • WorkflowValidator

Class WorkflowValidator

WorkflowValidator run validation for the current workflow event. This validator execute validation for all attributes belonging to the model and being configured for a scenario name that matches the sequence of scenario that is occuring.

For example, the the model is going from status A to status B, this validator - creates a scenario sequence (leave status {A}, from {A} to {B}, enter status {B}) - select attributes configured to be validated of compatibles scenario - run validation for all the previously selected attributes

yii\validators\Validator
Extended by raoul2000\workflow\validation\WorkflowValidator
Namespace: raoul2000\workflow\validation
Author: raoul
Located at validation/WorkflowValidator.php

Methods summary

public
# validateAttribute( $object, $attribute )

Apply active validators for the current workflow event sequence.

Apply active validators for the current workflow event sequence.

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

raoul2000\workflow\events\IEventSequence

Properties summary

public boolean $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).

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).

# false
yii2-workflow Class Reference API documentation generated by ApiGen