Exemplo n.º 1
0
 public function behaviors()
 {
     $behaviors = array_merge(parent::behaviors(), array('CTimestampBehavior' => array('class' => 'zii.behaviors.CTimestampBehavior', 'createAttribute' => 'created_at', 'updateAttribute' => 'updated_at', 'setUpdateOnCreate' => true, 'timestampExpression' => 'date("Y-m-d H:i:s");')));
     return $behaviors;
 }
Exemplo n.º 2
0
 public function behaviors()
 {
     $behaviors = array_merge(parent::behaviors(), array('CategoryTreeBehavior' => array('class' => 'yupe.components.behaviors.CategoryTreeBehavior', 'aliasAttribute' => 'alias', 'defaultCriteria' => array('order' => ' t.sort ASC, t.title ASC'))));
     return $behaviors;
 }
Exemplo n.º 3
0
 public function behaviors()
 {
     $behaviors = array_merge(parent::behaviors(), array('CategoryTreeBehavior' => array('class' => 'yupe.components.behaviors.CategoryTreeBehavior', 'aliasAttribute' => 'alias', 'defaultCriteria' => array('order' => ' t.sort ASC, t.title ASC')), 'CTimestampBehavior' => array('class' => 'zii.behaviors.CTimestampBehavior', 'createAttribute' => 'created_at', 'updateAttribute' => 'updated_at', 'setUpdateOnCreate' => true)));
     return $behaviors;
 }
Exemplo n.º 4
0
 public function behaviors()
 {
     $behaviors = array_merge(parent::behaviors(), array('CTimestampBehavior' => array('class' => 'zii.behaviors.CTimestampBehavior', 'createAttribute' => 'created_at', 'updateAttribute' => 'updated_at', 'setUpdateOnCreate' => true)));
     return $behaviors;
 }
Exemplo n.º 5
0
 public function behaviors()
 {
     $module = Yii::app()->getModule('service');
     $behaviors = array_merge(parent::behaviors(), array('imageUpload' => array('class' => 'yupe\\components\\behaviors\\ImageUploadBehavior', 'scenarios' => array('insert', 'update'), 'attributeName' => 'image', 'minSize' => $module->minSize, 'maxSize' => $module->maxSize, 'types' => $module->allowedExtensions, 'uploadPath' => $module->uploadPath), 'CTimestampBehavior' => array('class' => 'zii.behaviors.CTimestampBehavior', 'createAttribute' => 'created_at', 'updateAttribute' => 'updated_at', 'setUpdateOnCreate' => true)));
     return $behaviors;
 }