raoul2000 / yii2-workflow

A simple workflow engine for Yii2
BSD 3-Clause "New" or "Revised" License
171 stars 48 forks source link

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

Closed cornernote closed 8 years ago

cornernote commented 8 years ago

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.

cornernote commented 8 years ago

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