php - Attach Behavior to all Models -


i'm using yii framework , attach behavior named datetimei18nbehavior models.

i'm doing manually adding following code each model:

public function behaviors() {     return array(         'datetimei18nbehavior' => array('class' => 'ext.datetimei18nbehavior')     ); } 

it's possible that?

just create base model class function, , have other classes extend base model.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -