Minor - replace strval() with (string), use protected instead of private

https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/architecture.html#entities
pull/2624/head
Julio Montoya 7 years ago
parent 233ca60495
commit d9b5f024e9
  1. 1
      plugin/bbb/lang/french.php
  2. 2
      src/Chamilo/CoreBundle/Entity/AccessUrlRelCourse.php
  3. 70
      src/Chamilo/CoreBundle/Entity/Course.php
  4. 4
      src/Chamilo/CoreBundle/Entity/CourseRelClass.php
  5. 31
      src/Chamilo/CoreBundle/Entity/CourseRelUser.php
  6. 21
      src/Chamilo/CoreBundle/Entity/CourseRelUserCatalogue.php
  7. 34
      src/Chamilo/CoreBundle/Entity/CourseRequest.php
  8. 28
      src/Chamilo/CoreBundle/Entity/GradebookResultLog.php
  9. 26
      src/Chamilo/CoreBundle/Entity/GradebookScoreDisplay.php
  10. 69
      src/Chamilo/CoreBundle/Entity/Session.php
  11. 26
      src/Chamilo/CoreBundle/Entity/SessionRelCourseRelUser.php
  12. 21
      src/Chamilo/CoreBundle/Entity/SessionRelUser.php
  13. 5
      src/Chamilo/CoreBundle/Entity/Usergroup.php
  14. 4
      src/Chamilo/CoreBundle/Entity/UsergroupRelUser.php
  15. 4
      src/Chamilo/UserBundle/Entity/User.php

@ -69,4 +69,3 @@ $strings['launch_type'] = 'Type d\'interface au lancement';
$strings['EnterConferenceFlash'] = 'Entrer dans la salle de conférence (Flash)';
$strings['EnterConferenceHTML5'] = 'Entrer dans la salle de conférence (HTML5)';
$strings['ParticipantsWillUseSameInterface'] = 'Les apprenants utiliseront la même interface que vous';

@ -38,7 +38,7 @@ class AccessUrlRelCourse
*/
public function __toString()
{
return strval('-');
return '-';
}
/**

@ -37,6 +37,15 @@ class Course
const OPEN_WORLD = 3;
const HIDDEN = 4;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* "orphanRemoval" is needed to delete the CourseRelUser relation
* in the CourseAdmin class. The setUsers, getUsers, removeUsers and
@ -81,15 +90,6 @@ class Course
*/
protected $issuedSkills;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
@ -97,7 +97,7 @@ class Course
*
* @ORM\Column(name="title", type="string", length=250, nullable=true, unique=false)
*/
private $title;
protected $title;
/**
* @var string
@ -108,161 +108,161 @@ class Course
* )
* @ORM\Column(name="code", type="string", length=40, nullable=false, unique=true)
*/
private $code;
protected $code;
/**
* @var string
*
* @ORM\Column(name="directory", type="string", length=40, nullable=true, unique=false)
*/
private $directory;
protected $directory;
/**
* @var string
*
* @ORM\Column(name="course_language", type="string", length=20, nullable=true, unique=false)
*/
private $courseLanguage;
protected $courseLanguage;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true, unique=false)
*/
private $description;
protected $description;
/**
* @var string
*
* @ORM\Column(name="category_code", type="string", length=40, nullable=true, unique=false)
*/
private $categoryCode;
protected $categoryCode;
/**
* @var bool
* @Assert\NotBlank()
* @ORM\Column(name="visibility", type="integer", nullable=true, unique=false)
*/
private $visibility;
protected $visibility;
/**
* @var int
*
* @ORM\Column(name="show_score", type="integer", nullable=true, unique=false)
*/
private $showScore;
protected $showScore;
/**
* @var string
*
* @ORM\Column(name="tutor_name", type="string", length=200, nullable=true, unique=false)
*/
private $tutorName;
protected $tutorName;
/**
* @var string
*
* @ORM\Column(name="visual_code", type="string", length=40, nullable=true, unique=false)
*/
private $visualCode;
protected $visualCode;
/**
* @var string
*
* @ORM\Column(name="department_name", type="string", length=30, nullable=true, unique=false)
*/
private $departmentName;
protected $departmentName;
/**
* @var string
* @Assert\Url()
* @ORM\Column(name="department_url", type="string", length=180, nullable=true, unique=false)
*/
private $departmentUrl;
protected $departmentUrl;
/**
* @var int
*
* @ORM\Column(name="disk_quota", type="bigint", nullable=true, unique=false)
*/
private $diskQuota;
protected $diskQuota;
/**
* @var \DateTime
*
* @ORM\Column(name="last_visit", type="datetime", nullable=true, unique=false)
*/
private $lastVisit;
protected $lastVisit;
/**
* @var \DateTime
*
* @ORM\Column(name="last_edit", type="datetime", nullable=true, unique=false)
*/
private $lastEdit;
protected $lastEdit;
/**
* @var \DateTime
*
* @ORM\Column(name="creation_date", type="datetime", nullable=true, unique=false)
*/
private $creationDate;
protected $creationDate;
/**
* @var \DateTime
*
* @ORM\Column(name="expiration_date", type="datetime", nullable=true, unique=false)
*/
private $expirationDate;
protected $expirationDate;
/**
* @var bool
*
* @ORM\Column(name="subscribe", type="boolean", nullable=true, unique=false)
*/
private $subscribe;
protected $subscribe;
/**
* @var bool
*
* @ORM\Column(name="unsubscribe", type="boolean", nullable=true, unique=false)
*/
private $unsubscribe;
protected $unsubscribe;
/**
* @var string
*
* @ORM\Column(name="registration_code", type="string", length=255, nullable=true, unique=false)
*/
private $registrationCode;
protected $registrationCode;
/**
* @var string
*
* @ORM\Column(name="legal", type="text", nullable=true, unique=false)
*/
private $legal;
protected $legal;
/**
* @var int
*
* @ORM\Column(name="activate_legal", type="integer", nullable=true, unique=false)
*/
private $activateLegal;
protected $activateLegal;
/**
* @var bool
*
* @ORM\Column(name="add_teachers_to_sessions_courses", type="boolean", nullable=true)
*/
private $addTeachersToSessionsCourses;
protected $addTeachersToSessionsCourses;
/**
* @var int
*
* @ORM\Column(name="course_type_id", type="integer", nullable=true, unique=false)
*/
private $courseTypeId;
protected $courseTypeId;
/**
* @ORM\OneToMany(targetEntity="Chamilo\NotebookBundle\Entity\CNotebook", mappedBy="course")
@ -280,7 +280,7 @@ class Course
* @ORM\ManyToOne(targetEntity="Room")
* @ORM\JoinColumn(name="room_id", referencedColumnName="id")
*/
private $room;
protected $room;
/**
* Constructor.
@ -296,7 +296,7 @@ class Course
*/
public function __toString()
{
return strval($this->getTitle());
return (string) $this->getTitle();
}
/**

@ -20,7 +20,7 @@ class CourseRelClass
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/
private $courseCode;
protected $courseCode;
/**
* @var int
@ -29,7 +29,7 @@ class CourseRelClass
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/
private $classId;
protected $classId;
/**
* Set courseCode.

@ -21,6 +21,15 @@ use Doctrine\ORM\Mapping as ORM;
*/
class CourseRelUser
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="courses", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
@ -32,14 +41,6 @@ class CourseRelUser
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/
protected $course;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @var int
@ -49,42 +50,42 @@ class CourseRelUser
* @deprecated
* @ORM\Column(name="relation_type", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $relationType;
protected $relationType;
/**
* @var bool
*
* @ORM\Column(name="status", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $status;
protected $status;
/**
* @var bool
*
* @ORM\Column(name="is_tutor", type="boolean", nullable=true, unique=false)
*/
private $tutor;
protected $tutor;
/**
* @var int
*
* @ORM\Column(name="sort", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $sort;
protected $sort;
/**
* @var int
*
* @ORM\Column(name="user_course_cat", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $userCourseCat;
protected $userCourseCat;
/**
* @var int
*
* @ORM\Column(name="legal_agreement", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $legalAgreement;
protected $legalAgreement;
/**
* Constructor.
@ -99,7 +100,7 @@ class CourseRelUser
*/
public function __toString()
{
return strval($this->getCourse()->getCode());
return (string) $this->getCourse()->getCode();
}
/**

@ -21,6 +21,15 @@ use Doctrine\ORM\Mapping as ORM;
*/
class CourseRelUserCatalogue
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="courses", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
@ -32,21 +41,13 @@ class CourseRelUserCatalogue
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/
protected $course;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @var bool
*
* @ORM\Column(name="visible", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $visible;
protected $visible;
/**
* Constructor.
@ -60,7 +61,7 @@ class CourseRelUserCatalogue
*/
public function __toString()
{
return strval($this->getCourse()->getCode());
return (string) $this->getCourse()->getCode();
}
/**

@ -22,119 +22,119 @@ class CourseRequest
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
protected $id;
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=40, nullable=false)
*/
private $code;
protected $code;
/**
* @var int
*
* @ORM\Column(name="user_id", type="integer", nullable=false)
*/
private $userId;
protected $userId;
/**
* @var string
*
* @ORM\Column(name="directory", type="string", length=40, nullable=true)
*/
private $directory;
protected $directory;
/**
* @var string
*
* @ORM\Column(name="db_name", type="string", length=40, nullable=true)
*/
private $dbName;
protected $dbName;
/**
* @var string
*
* @ORM\Column(name="course_language", type="string", length=20, nullable=true)
*/
private $courseLanguage;
protected $courseLanguage;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=250, nullable=true)
*/
private $title;
protected $title;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
protected $description;
/**
* @var string
*
* @ORM\Column(name="category_code", type="string", length=40, nullable=true)
*/
private $categoryCode;
protected $categoryCode;
/**
* @var string
*
* @ORM\Column(name="tutor_name", type="string", length=200, nullable=true)
*/
private $tutorName;
protected $tutorName;
/**
* @var string
*
* @ORM\Column(name="visual_code", type="string", length=40, nullable=true)
*/
private $visualCode;
protected $visualCode;
/**
* @var \DateTime
*
* @ORM\Column(name="request_date", type="datetime", nullable=false)
*/
private $requestDate;
protected $requestDate;
/**
* @var string
*
* @ORM\Column(name="objetives", type="text", nullable=true)
*/
private $objetives;
protected $objetives;
/**
* @var string
*
* @ORM\Column(name="target_audience", type="text", nullable=true)
*/
private $targetAudience;
protected $targetAudience;
/**
* @var int
*
* @ORM\Column(name="status", type="integer", nullable=false)
*/
private $status;
protected $status;
/**
* @var int
*
* @ORM\Column(name="info", type="integer", nullable=false)
*/
private $info;
protected $info;
/**
* @var int
*
* @ORM\Column(name="exemplary_content", type="integer", nullable=false)
*/
private $exemplaryContent;
protected $exemplaryContent;
/**
* Set code.

@ -13,49 +13,49 @@ use Doctrine\ORM\Mapping as ORM;
*/
class GradebookResultLog
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/**
* @var int
*
* @ORM\Column(name="id_result", type="integer", nullable=false)
*/
private $idResult;
protected $idResult;
/**
* @var int
*
* @ORM\Column(name="user_id", type="integer", nullable=false)
*/
private $userId;
protected $userId;
/**
* @var int
*
* @ORM\Column(name="evaluation_id", type="integer", nullable=false)
*/
private $evaluationId;
protected $evaluationId;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
private $createdAt;
protected $createdAt;
/**
* @var float
*
* @ORM\Column(name="score", type="float", precision=10, scale=0, nullable=true)
*/
private $score;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
protected $score;
/**
* Set idResult.

@ -13,42 +13,42 @@ use Doctrine\ORM\Mapping as ORM;
*/
class GradebookScoreDisplay
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $id;
/**
* @var float
*
* @ORM\Column(name="score", type="float", precision=10, scale=0, nullable=false)
*/
private $score;
protected $score;
/**
* @var string
*
* @ORM\Column(name="display", type="string", length=40, nullable=false)
*/
private $display;
protected $display;
/**
* @var int
*
* @ORM\Column(name="category_id", type="integer", nullable=false)
*/
private $categoryId;
protected $categoryId;
/**
* @var float
*
* @ORM\Column(name="score_color_percent", type="float", precision=10, scale=0, nullable=false)
*/
private $scoreColorPercent;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
protected $scoreColorPercent;
/**
* Set score.

@ -37,6 +37,15 @@ class Session
const DRH = 1;
const COACH = 2;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="SessionRelCourse", mappedBy="session", cascade={"persist"}, orphanRemoval=true)
@ -60,126 +69,117 @@ class Session
*/
protected $currentCourse;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=150, nullable=false, unique=false)
*/
private $name;
protected $name;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true, unique=false)
*/
private $description;
protected $description;
/**
* @var bool
*
* @ORM\Column(name="show_description", type="boolean", nullable=true)
*/
private $showDescription;
protected $showDescription;
/**
* @var int
*
* @ORM\Column(name="duration", type="integer", nullable=true)
*/
private $duration;
protected $duration;
/**
* @var int
*
* @ORM\Column(name="nbr_courses", type="smallint", nullable=true, unique=false)
*/
private $nbrCourses;
protected $nbrCourses;
/**
* @var int
*
* @ORM\Column(name="nbr_users", type="integer", nullable=true, unique=false)
*/
private $nbrUsers;
protected $nbrUsers;
/**
* @var int
*
* @ORM\Column(name="nbr_classes", type="integer", nullable=true, unique=false)
*/
private $nbrClasses;
protected $nbrClasses;
/**
* @var int
*
* @ORM\Column(name="session_admin_id", type="integer", nullable=true, unique=false)
*/
private $sessionAdminId;
protected $sessionAdminId;
/**
* @var int
*
* @ORM\Column(name="visibility", type="integer", nullable=false, unique=false)
*/
private $visibility;
protected $visibility;
/**
* @var int
*
* @ORM\Column(name="promotion_id", type="integer", nullable=true, unique=false)
*/
private $promotionId;
protected $promotionId;
/**
* @var \DateTime
*
* @ORM\Column(name="display_start_date", type="datetime", nullable=true, unique=false)
*/
private $displayStartDate;
protected $displayStartDate;
/**
* @var \DateTime
*
* @ORM\Column(name="display_end_date", type="datetime", nullable=true, unique=false)
*/
private $displayEndDate;
protected $displayEndDate;
/**
* @var \DateTime
*
* @ORM\Column(name="access_start_date", type="datetime", nullable=true, unique=false)
*/
private $accessStartDate;
protected $accessStartDate;
/**
* @var \DateTime
*
* @ORM\Column(name="access_end_date", type="datetime", nullable=true, unique=false)
*/
private $accessEndDate;
protected $accessEndDate;
/**
* @var \DateTime
*
* @ORM\Column(name="coach_access_start_date", type="datetime", nullable=true, unique=false)
*/
private $coachAccessStartDate;
protected $coachAccessStartDate;
/**
* @var \DateTime
*
* @ORM\Column(name="coach_access_end_date", type="datetime", nullable=true, unique=false)
*/
private $coachAccessEndDate;
protected $coachAccessEndDate;
/**
* Only available when "session_list_order" setting is on.
@ -188,36 +188,36 @@ class Session
*
* @ORM\Column(name="position", type="integer", nullable=false)
*/
//private $position;
//protected $position;
/**
* @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CItemProperty", mappedBy="session")
*/
//private $items;
//protected $items;
/**
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="sessionAsGeneralCoach")
* @ORM\JoinColumn(name="id_coach", referencedColumnName="id")
*/
private $generalCoach;
protected $generalCoach;
/**
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\SessionCategory", inversedBy="session")
* @ORM\JoinColumn(name="session_category_id", referencedColumnName="id")
*/
private $category;
protected $category;
/**
* @var bool
* @ORM\Column(name="send_subscription_notification", type="boolean", nullable=false, options={"default":false})
*/
private $sendSubscriptionNotification;
protected $sendSubscriptionNotification;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CStudentPublication", mappedBy="session", cascade={"persist"}, orphanRemoval=true)
*/
private $studentPublications;
protected $studentPublications;
/**
* Constructor.
@ -228,7 +228,6 @@ class Session
$this->nbrClasses = 0;
$this->nbrUsers = 0;
$this->nbrUsers = 0;
$this->displayStartDate = new \DateTime();
$this->displayEndDate = new \DateTime();
@ -359,11 +358,11 @@ class Session
{
if ($this->getUsers()->count()) {
$criteria = Criteria::create()->where(
Criteria::expr()->eq("user", $subscription->getUser())
Criteria::expr()->eq('user', $subscription->getUser())
)->andWhere(
Criteria::expr()->eq("session", $subscription->getSession())
Criteria::expr()->eq('session', $subscription->getSession())
)->andWhere(
Criteria::expr()->eq("relationType", $subscription->getRelationType())
Criteria::expr()->eq('relationType', $subscription->getRelationType())
);
$relation = $this->getUsers()->matching($criteria);

@ -28,6 +28,15 @@ class SessionRelCourseRelUser
2 => 'course_coach',
];
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/**
* @var User
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="sessionCourseSubscriptions", cascade={"persist"})
@ -44,40 +53,31 @@ class SessionRelCourseRelUser
/**
* @var Course
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="sessionUserSubscriptions", cascade={"persist"})
* @ORM\ManyToOne(targetEntity="Course", inversedBy="sessionUserSubscriptions", cascade={"persist"})
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
*/
protected $course;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="visibility", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $visibility;
protected $visibility;
/**
* @var int
*
* @ORM\Column(name="status", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $status;
protected $status;
/**
* @var int
*
* @ORM\Column(name="legal_agreement", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $legalAgreement;
protected $legalAgreement;
/**
* Constructor.

@ -23,6 +23,7 @@ class SessionRelUser
0 => 'student',
1 => 'drh',
];
/**
* @var int
*
@ -30,67 +31,67 @@ class SessionRelUser
* @ORM\Id
* @ORM\GeneratedValue
*/
private $iid;
protected $id;
/**
* @ORM\ManyToOne(targetEntity="Session", inversedBy="users", cascade={"persist"})
* @ORM\JoinColumn(name="session_id", referencedColumnName="id")
*/
private $session;
protected $session;
/**
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="users", cascade={"persist"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;
protected $user;
/**
* @var int
*
* @ORM\Column(name="relation_type", type="integer", nullable=false, unique=false)
*/
private $relationType;
protected $relationType;
/**
* @var int
*
* @ORM\Column(name="duration", type="integer", nullable=true)
*/
private $duration;
protected $duration;
/**
* @var int
*
* @ORM\Column(name="moved_to", type="integer", nullable=true, unique=false)
*/
private $movedTo;
protected $movedTo;
/**
* @var int
*
* @ORM\Column(name="moved_status", type="integer", nullable=true, unique=false)
*/
private $movedStatus;
protected $movedStatus;
/**
* @var \DateTime
*
* @ORM\Column(name="moved_at", type="datetime", nullable=true, unique=false)
*/
private $movedAt;
protected $movedAt;
/**
* @var \DateTime
* @ORM\Column(name="registered_at", type="datetime", nullable=false, unique=false)
*/
private $registeredAt;
protected $registeredAt;
/**
* Constructor.
*/
public function __construct()
{
$this->moved_to = null;
$this->movedTo = null;
$this->movedStatus = null;
$this->movedAt = null;
$this->registeredAt = new \DateTime('now', new \DateTimeZone('UTC'));

@ -27,7 +27,7 @@ class Usergroup
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, precision=0, scale=0, nullable=false, unique=false)
* @ORM\Column(name="name", type="string", length=255, nullable=false, unique=false)
*/
protected $name;
@ -101,6 +101,9 @@ class Usergroup
*/
protected $users;
/**
* Usergroup constructor.
*/
public function __construct()
{
//$this->users = new ArrayCollection();

@ -23,7 +23,7 @@ class UsergroupRelUser
/**
* @var int
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Column(name="id", type="integer", nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue
*/
@ -115,7 +115,7 @@ class UsergroupRelUser
*
* @param int $relationType
*
* @return GroupRelUser
* @return $this
*/
public function setRelationType($relationType)
{

@ -264,7 +264,7 @@ class User implements UserInterface //implements ParticipantInterface, ThemeUser
*/
protected $groups;
//private $isActive;
//protected $isActive;
/**
* ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\CurriculumItemRelUser", mappedBy="user").
@ -285,7 +285,7 @@ class User implements UserInterface //implements ParticipantInterface, ThemeUser
/**
* @var ArrayCollection
* ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\UserFieldValues", mappedBy="user", orphanRemoval=true, cascade={"persist"})
* ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\UserFieldValues", mappedBy="user", orphanRemoval=true, cascade={"persist"})
*/
protected $extraFields;

Loading…
Cancel
Save