Yii: Zend's preDispatch and init analogon -
i have translate applications zend yii framework. since i'm new zend, wonder how implement controllers predispatch() , init() functions in yii. advice.
for init there same init
function in yii controllers.
public function init() { // initialization }
for predispatch can use beforeaction
, called before action - return true if want action executed, or false cancel execution.
protected function beforeaction($action) { // logic before action return true; }
when ovveriding custom controller parent methods should called.
there usefull filter actions
Comments
Post a Comment