Yii Framework Forum: Error Handling Question - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Error Handling Question Rate Topic: -----

#1 User is offline   bonez05 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-November 12

Posted 30 November 2012 - 04:50 PM

Right now I have in my layout

if (Yii::app->user->hasErrors()) {
     echo Yii::app->user->getFlash('error');
}



Instead of in all of my controllers calling s
etFlash->('error', CHtml::errorSummary($model));
after each model reference, I'd like to extend the ActiveRecord class to setFlash if there are errors. Anybody have any tips for the BEST way to go about this?

Thanks
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users