public function behaviors() { return ['fileUpload' => ['class' => fileUploadBehavior::className(), 'toAttribute' => 'team_logo', 'imagePath' => self::TEAMS_LOGO_UPLOAD_PATH, 'default' => 'nologo.jpeg', 'prefix' => 'time']]; }
/** * @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']]; }