userCourseCat = 0; } /** * @return string */ public function __toString() { return (string) $this->getCourse()->getCode(); } /** * @return EntityRepository */ public static function getRepository() { return Database::getManager()->getRepository('ChamiloCoreBundle:CourseRelUser'); } /** * @return int */ public function getId() { return $this->id; } /** * @param int $id */ public function setId($id) { $this->id = $id; } /** * @param Course $course * * @return $this */ public function setCourse($course) { $this->course = $course; $this->course->getUsers()->add($this); return $this; } /** * Get Course. * * @return Course */ public function getCourse() { return $this->course; } /** * @param User $user * * @return $this */ public function setUser($user) { $this->user = $user; $this->user->getCourses()->add($this); return $this; } /** * Get User. * * @return User */ public function getUser() { return $this->user; } /** * Set relationType. * * @param int $relationType * * @return CourseRelUser */ public function setRelationType($relationType) { $this->relationType = $relationType; return $this; } /** * Get relationType. * * @return int */ public function getRelationType() { return $this->relationType; } /** * Set status. * * @param bool $status * * @return CourseRelUser */ public function setStatus($status) { $this->status = $status; return $this; } /** * Get status. * * @return bool */ public function getStatus() { return $this->status; } /** * Set sort. * * @param int $sort * * @return CourseRelUser */ public function setSort($sort) { $this->sort = $sort; return $this; } /** * Get sort. * * @return int */ public function getSort() { return $this->sort; } /** * @return bool */ public function isTutor() { return $this->tutor; } /** * @param bool $tutor * * @return CourseRelUser */ public function setTutor($tutor) { $this->tutor = $tutor; return $this; } /** * Set userCourseCat. * * @param int $userCourseCat * * @return CourseRelUser */ public function setUserCourseCat($userCourseCat) { $this->userCourseCat = $userCourseCat; return $this; } /** * Get userCourseCat. * * @return int */ public function getUserCourseCat() { return $this->userCourseCat; } /** * Set legalAgreement. * * @param int $legalAgreement * * @return CourseRelUser */ public function setLegalAgreement($legalAgreement) { $this->legalAgreement = $legalAgreement; return $this; } /** * Get legalAgreement. * * @return int */ public function getLegalAgreement() { return $this->legalAgreement; } /** * Get relation_type list. * * @deprecated * * @return array */ public static function getRelationTypeList() { return [ '0' => '', COURSE_RELATION_TYPE_RRHH => 'drh', ]; } /** * Get status list. * * @return array */ public static function getStatusList() { return [ User::COURSE_MANAGER => 'Teacher', User::STUDENT => 'Student', //User::DRH => 'DRH' ]; } }