raoul2000 / yii2-workflow

A simple workflow engine for Yii2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when invalidating a status change, where does the message go to?

cornernote opened this issue · comments

I have the following event:

    public static function beforeEnterProduction($event)
    {
        /** @var \app\models\Job $job */
        $job = $event->sender->owner;
        if ($job->company->status == 'company/suspended') {
            $message = Yii::t('app', 'Cannot change Status to Production, the company is suspended.');
            $event->invalidate($message);
        }
    }

I would like to output this message somewhere, but I can't seem to find where it goes.

Oh, nevermind, it goes into the model's errors. I didn't see it because I was redirecting.