예제 #1
0
 public function behaviors()
 {
     return ['timestamp' => ['class' => TimeStampBehavior::className(), 'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']], 'value' => new Expression('NOW()')]];
 }
예제 #2
0
파일: User.php 프로젝트: erycamel/yiisms
 public function behaviors()
 {
     return [TimeStampBehavior::className()];
 }