raoul2000\workflow\events\WorkflowEvent::invalidate PHP Method

invalidate() public method

Calling this method is equivalent to setting the *isValid* property to false. Additionnally a message can be added to the internal error message queue. If $handled is set to true, following event handlers that may be installed for this event will not be invoked.
See also: http://www.yiiframework.com/doc-2.0/guide-concept-events.html#event-handler-order
See also: http://www.yiiframework.com/doc-2.0/yii-base-event.html#$handled-detail
public invalidate ( string $message = null, boolean $handled = false )
$message string error message
$handled boolean Whether the event is handled. Defaults to false. When a handler sets this to be true, the event processing will stop and ignore the rest of the uninvoked event handlers.
    public function invalidate($message = null, $handled = false)
    {
        $this->isValid = false;
        $this->handled = $handled;
        if (!empty($message)) {
            $this->_errorMessage[] = $message;
        }
    }