예제 #1
0
 public function behaviors()
 {
     return ['fileUpload' => ['class' => fileUploadBehavior::className(), 'toAttribute' => 'team_logo', 'imagePath' => self::TEAMS_LOGO_UPLOAD_PATH, 'default' => 'nologo.jpeg', 'prefix' => 'time']];
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['TimestampBehavior' => ['class' => TimestampBehavior::className(), 'createdAtAttribute' => 'created_on', 'updatedAtAttribute' => 'updated_on'], 'fileUpload' => ['class' => fileUploadBehavior::className(), 'toAttribute' => 'avatar', 'imagePath' => self::AVATAR_PATH, 'default' => 'default.jpg', 'prefix' => 'username']];
 }