src/Entity/TheClass.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TheClassRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use JMS\Serializer\Annotation\Groups;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use App\Entity\Traits\Timestampable;
  10. #[ORM\HasLifecycleCallbacks]
  11. #[ORM\Entity(repositoryClassTheClassRepository::class)]
  12. class TheClass
  13. {
  14.     use Timestampable;
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     #[Groups(['homework','note','getStudents','getSubject','getClass','getDiscussionClass','getExamStudent','getStatsStudentParentIndex'])]
  19.     private ?int $id null;
  20.     #[ORM\Column(length255)]
  21.     #[Groups(['homework','getLate','note','getStudents','getClass','getDiscussionClass','getDiscussion','getExamStudent','getAbsence','getPunish','getStatsStudentParentIndex'])]
  22.     private ?string $name null;
  23.     #[ORM\ManyToOne(cascade: ["persist"], inversedBy'theClasses')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?SchoolSection $section null;
  26.     #[ORM\OneToMany(mappedBy'classe'targetEntityStudentYear::class)]
  27.     private Collection $studentsYears;
  28.     #[ORM\OneToMany(mappedBy'classe'targetEntitySubject::class)]
  29.     private Collection $subjects;
  30.     #[ORM\OneToMany(mappedBy'classe'targetEntityHomeWork::class)]
  31.     private Collection $homeWorks;
  32.     #[ORM\Column(nullabletrue)]
  33.     private ?bool $active null;
  34.     #[ORM\OneToMany(mappedBy'classe'targetEntityNote::class)]
  35.     private Collection $notes;
  36.     #[ORM\ManyToMany(targetEntityUserYear::class, mappedBy'classes')]
  37.     private Collection $userYears;
  38.     #[ORM\ManyToMany(targetEntityDocInfo::class, mappedBy'classes'cascade: ['persist''remove'])]
  39.     private Collection $docInfos;
  40.     #[ORM\ManyToOne(cascade: ["persist"], inversedBy'theClasses')]
  41.     private ?User $author null;
  42.     #[ORM\ManyToOne(cascade: ["persist"], inversedBy'theClassesEdited')]
  43.     private ?User $editor null;
  44.     #[ORM\ManyToOne(cascade: ["persist"], inversedBy'theClasses')]
  45.     #[Groups(['getClass'])]
  46.     private ?School $school null;
  47.     #[ORM\OneToMany(mappedBy'classe'targetEntityDiscussionClass::class)]
  48.     private Collection $discussionClasses;
  49.     #[ORM\OneToMany(mappedBy'classe'targetEntitySubjectGroup::class, orphanRemovaltrue)]
  50.     private Collection $subjectGroups;
  51.     #[ORM\OneToMany(mappedBy'classe'targetEntityScolarity::class, orphanRemovaltrue)]
  52.     private Collection $scolarities;
  53.     #[ORM\OneToMany(mappedBy'classe'targetEntityExamAgenda::class)]
  54.     private Collection $examAgendas;
  55.     #[ORM\OneToMany(mappedBy'classe'targetEntitySubSequence::class, orphanRemovaltrue)]
  56.     private Collection $subSequences;
  57.     #[ORM\OneToMany(mappedBy'classe'targetEntityQuarter::class, orphanRemovaltrue)]
  58.     private Collection $quarters;
  59.     #[ORM\OneToMany(mappedBy'classe'targetEntitySubNote::class, orphanRemovaltrue)]
  60.     private Collection $subNotes;
  61.     #[ORM\OneToMany(mappedBy'classe'targetEntityPunish::class)]
  62.     private Collection $punishes;
  63.     #[ORM\OneToMany(mappedBy'classe'targetEntityDisciplineWarning::class)]
  64.     private Collection $disciplineWarnings;
  65.     #[ORM\OneToMany(mappedBy'classe'targetEntityDisciplineBlame::class)]
  66.     private Collection $disciplineBlames;
  67.     #[ORM\OneToMany(mappedBy'classe'targetEntityDisciplineExclusion::class)]
  68.     private Collection $disciplineExclusions;
  69.     #[ORM\OneToMany(mappedBy'classe'targetEntityParentNote::class)]
  70.     private Collection $parentNotes;
  71.     #[ORM\OneToMany(mappedBy'classe'targetEntityAbsence::class)]
  72.     private Collection $absences;
  73.     #[ORM\OneToMany(mappedBy'classe'targetEntityDisciplineRetained::class)]
  74.     private Collection $disciplineRetaineds;
  75.     #[ORM\ManyToOne(inversedBy'theClassesTeached')]
  76.     private ?User $prof null;
  77.     #[ORM\OneToMany(mappedBy'classe'targetEntityPrimaryParentNote::class)]
  78.     private Collection $primaryParentNotes;
  79.     #[ORM\OneToMany(mappedBy'classe'targetEntityPrimaryNote::class)]
  80.     private Collection $primaryNotes;
  81.     #[ORM\OneToMany(mappedBy'classe'targetEntityDisciplinePunish::class)]
  82.     private Collection $disciplinePunishes;
  83.     #[ORM\OneToMany(mappedBy'classe'targetEntityLate::class)]
  84.     private Collection $lates;
  85.     #[ORM\OneToMany(mappedBy'classe'targetEntityBlame::class)]
  86.     private Collection $blames;
  87.     #[ORM\OneToMany(mappedBy'classe'targetEntityWarning::class)]
  88.     private Collection $warnings;
  89.     #[ORM\OneToMany(mappedBy'classe'targetEntityRetained::class)]
  90.     private Collection $retaineds;
  91.     #[ORM\Column(length255nullabletrue)]
  92.     private ?string $slug null;
  93.     #[ORM\OneToMany(mappedBy'classe'targetEntityDisciplineConcile::class)]
  94.     private Collection $disciplineConciles;
  95.     #[ORM\ManyToOne(inversedBy'principalClasses')]
  96.     private ?UserYear $principalProf null;
  97.     #[ORM\OneToMany(mappedBy'classe'targetEntityAgendaDay::class)]
  98.     private Collection $agendaDays;
  99.     #[ORM\OneToMany(mappedBy'classe'targetEntityCompetence::class)]
  100.     private Collection $competences;
  101.     #[ORM\OneToMany(mappedBy'classe'targetEntityWeekSubjectGoal::class)]
  102.     private Collection $weekSubjectGoals;
  103.     #[ORM\OneToMany(mappedBy'classe'targetEntityAgendaElement::class)]
  104.     private Collection $agendaElements;
  105.     public function __toString(): string
  106.     {
  107.         return $this->name;
  108.     }
  109.     public function __construct()
  110.     {
  111.         $this->subjects = new ArrayCollection();
  112.         $this->studentsYears = new ArrayCollection();
  113.         $this->homeWorks = new ArrayCollection();
  114.         $this->notes = new ArrayCollection();
  115.         $this->userYears = new ArrayCollection();
  116.         $this->docInfos = new ArrayCollection();
  117.         $this->discussionClasses = new ArrayCollection();
  118.         $this->subjectGroups = new ArrayCollection();
  119.         $this->scolarities = new ArrayCollection();
  120.         $this->subSequences = new ArrayCollection();
  121.         $this->quarters = new ArrayCollection();
  122.         $this->subNotes = new ArrayCollection();
  123.         $this->disciplineWarnings = new ArrayCollection();
  124.         $this->disciplineBlames = new ArrayCollection();
  125.         $this->disciplineExclusions = new ArrayCollection();
  126.         $this->parentNotes = new ArrayCollection();
  127.         $this->absences = new ArrayCollection();
  128.         $this->disciplineRetaineds = new ArrayCollection();
  129.         $this->primaryParentNotes = new ArrayCollection();
  130.         $this->primaryNotes = new ArrayCollection();
  131.         $this->punishes = new ArrayCollection();
  132.         $this->disciplinePunishes = new ArrayCollection();
  133.         $this->lates = new ArrayCollection();
  134.         $this->blames = new ArrayCollection();
  135.         $this->warnings = new ArrayCollection();
  136.         $this->retaineds = new ArrayCollection();
  137.         $this->disciplineConciles = new ArrayCollection();
  138.         $this->agendaDays = new ArrayCollection();
  139.         $this->competences = new ArrayCollection();
  140.         $this->weekSubjectGoals = new ArrayCollection();
  141.         $this->agendaElements = new ArrayCollection();
  142.     }
  143.     public function getId(): ?int
  144.     {
  145.         return $this->id;
  146.     }
  147.     public function getName(): ?string
  148.     {
  149.         return $this->name;
  150.     }
  151.     public function setName(string $name): static
  152.     {
  153.         $this->name $name;
  154.         return $this;
  155.     }
  156.     public function getSection(): ?SchoolSection
  157.     {
  158.         return $this->section;
  159.     }
  160.     public function setSection(?SchoolSection $section): static
  161.     {
  162.         $this->section $section;
  163.         return $this;
  164.     }
  165.     /**
  166.      * @return Collection<int, StudentYear>
  167.      */
  168.     public function getStudentsYears(): Collection
  169.     {
  170.         return $this->studentsYears;
  171.     }
  172.     public function addStudentsYear(StudentYear $studentsYear): static
  173.     {
  174.         if (!$this->studentsYears->contains($studentsYear)) {
  175.             $this->studentsYears->add($studentsYear);
  176.             $studentsYear->setClasse($this);
  177.         }
  178.         return $this;
  179.     }
  180.     public function removeStudentsYear(StudentYear $studentsYear): static
  181.     {
  182.         if ($this->studentsYears->removeElement($studentsYear)) {
  183.             // set the owning side to null (unless already changed)
  184.             if ($studentsYear->getClasse() === $this) {
  185.                 $studentsYear->setClasse(null);
  186.             }
  187.         }
  188.         return $this;
  189.     }
  190.     /**
  191.      * @return Collection<int, Subject>
  192.      */
  193.     public function getSubjects(): Collection
  194.     {
  195.         return $this->subjects;
  196.     }
  197.     public function addSubject(Subject $subject): static
  198.     {
  199.         if (!$this->subjects->contains($subject)) {
  200.             $this->subjects->add($subject);
  201.             $subject->setClasse($this);
  202.         }
  203.         return $this;
  204.     }
  205.     public function removeSubject(Subject $subject): static
  206.     {
  207.         if ($this->subjects->removeElement($subject)) {
  208.             // set the owning side to null (unless already changed)
  209.             if ($subject->getClasse() === $this) {
  210.                 $subject->setClasse(null);
  211.             }
  212.         }
  213.         return $this;
  214.     }
  215.     /**
  216.      * @return Collection<int, HomeWork>
  217.      */
  218.     public function getHomeWorks(): Collection
  219.     {
  220.         return $this->homeWorks;
  221.     }
  222.     public function addHomeWork(HomeWork $homeWork): static
  223.     {
  224.         if (!$this->homeWorks->contains($homeWork)) {
  225.             $this->homeWorks->add($homeWork);
  226.             $homeWork->setClasse($this);
  227.         }
  228.         return $this;
  229.     }
  230.     public function removeHomework(HomeWork $homeWork): static
  231.     {
  232.         if ($this->homeWorks->removeElement($homeWork)) {
  233.             // set the owning side to null (unless already changed)
  234.             if ($homeWork->getClasse() === $this) {
  235.                 $homeWork->setClasse(null);
  236.             }
  237.         }
  238.         return $this;
  239.     }
  240.     public function isActive(): ?bool
  241.     {
  242.         return $this->active;
  243.     }
  244.     public function setActive(?bool $active): static
  245.     {
  246.         $this->active $active;
  247.         return $this;
  248.     }
  249.     /**
  250.      * @return Collection<int, Note>
  251.      */
  252.     public function getNotes(): Collection
  253.     {
  254.         return $this->notes;
  255.     }
  256.     public function addNote(Note $note): static
  257.     {
  258.         if (!$this->notes->contains($note)) {
  259.             $this->notes->add($note);
  260.             $note->setClasse($this);
  261.         }
  262.         return $this;
  263.     }
  264.     public function removeNote(Note $note): static
  265.     {
  266.         if ($this->notes->removeElement($note)) {
  267.             // set the owning side to null (unless already changed)
  268.             if ($note->getClasse() === $this) {
  269.                 $note->setClasse(null);
  270.             }
  271.         }
  272.         return $this;
  273.     }
  274.     /**
  275.      * @return Collection<int, UserYear>
  276.      */
  277.     public function getUserYears(): Collection
  278.     {
  279.         return $this->userYears;
  280.     }
  281.     public function addUserYear(UserYear $userYear): static
  282.     {
  283.         if (!$this->userYears->contains($userYear)) {
  284.             $this->userYears->add($userYear);
  285.             $userYear->addClass($this);
  286.         }
  287.         return $this;
  288.     }
  289.     public function removeUserYear(UserYear $userYear): static
  290.     {
  291.         if ($this->userYears->removeElement($userYear)) {
  292.             $userYear->removeClass($this);
  293.         }
  294.         return $this;
  295.     }
  296.     /**
  297.      * @return Collection<int, DocInfo>
  298.      */
  299.     public function getDocInfos(): Collection
  300.     {
  301.         return $this->docInfos;
  302.     }
  303.     public function addDocInfo(DocInfo $docInfo): static
  304.     {
  305.         if (!$this->docInfos->contains($docInfo)) {
  306.             $this->docInfos->add($docInfo);
  307.             $docInfo->addClass($this);
  308.         }
  309.         return $this;
  310.     }
  311.     public function removeDocInfo(DocInfo $docInfo): static
  312.     {
  313.         if ($this->docInfos->removeElement($docInfo)) {
  314.             $docInfo->removeClass($this);
  315.         }
  316.         return $this;
  317.     }
  318.     public function getAuthor(): ?User
  319.     {
  320.         return $this->author;
  321.     }
  322.     public function setAuthor(?User $author): static
  323.     {
  324.         $this->author $author;
  325.         return $this;
  326.     }
  327.     public function getEditor(): ?User
  328.     {
  329.         return $this->editor;
  330.     }
  331.     public function setEditor(?User $editor): static
  332.     {
  333.         $this->editor $editor;
  334.         return $this;
  335.     }
  336.     public function getSchool(): ?School
  337.     {
  338.         return $this->school;
  339.     }
  340.     public function setSchool(?School $school): static
  341.     {
  342.         $this->school $school;
  343.         return $this;
  344.     }
  345.     /**
  346.      * @return Collection<int, DiscussionClass>
  347.      */
  348.     public function getDiscussionClasses(): Collection
  349.     {
  350.         return $this->discussionClasses;
  351.     }
  352.     public function addDiscussionClass(DiscussionClass $discussionClass): static
  353.     {
  354.         if (!$this->discussionClasses->contains($discussionClass)) {
  355.             $this->discussionClasses->add($discussionClass);
  356.             $discussionClass->setClasse($this);
  357.         }
  358.         return $this;
  359.     }
  360.     public function removeDiscussionClass(DiscussionClass $discussionClass): static
  361.     {
  362.         if ($this->discussionClasses->removeElement($discussionClass)) {
  363.             // set the owning side to null (unless already changed)
  364.             if ($discussionClass->getClasse() === $this) {
  365.                 $discussionClass->setClasse(null);
  366.             }
  367.         }
  368.         return $this;
  369.     }
  370.     /**
  371.      * @return Collection<int, SubjectGroup>
  372.      */
  373.     public function getSubjectGroups(): Collection
  374.     {
  375.         return $this->subjectGroups;
  376.     }
  377.     public function addSubjectGroup(SubjectGroup $subjectGroup): static
  378.     {
  379.         if (!$this->subjectGroups->contains($subjectGroup)) {
  380.             $this->subjectGroups->add($subjectGroup);
  381.             $subjectGroup->setClasse($this);
  382.         }
  383.         return $this;
  384.     }
  385.     public function removeSubjectGroup(SubjectGroup $subjectGroup): static
  386.     {
  387.         if ($this->subjectGroups->removeElement($subjectGroup)) {
  388.             // set the owning side to null (unless already changed)
  389.             if ($subjectGroup->getClasse() === $this) {
  390.                 $subjectGroup->setClasse(null);
  391.             }
  392.         }
  393.         return $this;
  394.     }
  395.     /**
  396.      * @return Collection<int, Scolarity>
  397.      */
  398.     public function getScolarities(): Collection
  399.     {
  400.         return $this->scolarities;
  401.     }
  402.     public function addScolarity(Scolarity $scolarity): static
  403.     {
  404.         if (!$this->scolarities->contains($scolarity)) {
  405.             $this->scolarities->add($scolarity);
  406.             $scolarity->setClasse($this);
  407.         }
  408.         return $this;
  409.     }
  410.     public function removeScolarity(Scolarity $scolarity): static
  411.     {
  412.         if ($this->scolarities->removeElement($scolarity)) {
  413.             // set the owning side to null (unless already changed)
  414.             if ($scolarity->getClasse() === $this) {
  415.                 $scolarity->setClasse(null);
  416.             }
  417.         }
  418.         return $this;
  419.     }
  420.     /**
  421.      * @return Collection<int, ExamAgenda>
  422.      */
  423.     public function getExamAgendas(): Collection
  424.     {
  425.         return $this->examAgendas;
  426.     }
  427.     public function addExamAgenda(ExamAgenda $examAgenda): static
  428.     {
  429.         if (!$this->examAgendas->contains($examAgenda)) {
  430.             $this->examAgendas->add($examAgenda);
  431.             $examAgenda->setClasse($this);
  432.         }
  433.         return $this;
  434.     }
  435.     public function removeExamAgenda(ExamAgenda $examAgenda): static
  436.     {
  437.         if ($this->examAgendas->removeElement($examAgenda)) {
  438.             // set the owning side to null (unless already changed)
  439.             if ($examAgenda->getClasse() === $this) {
  440.                 $examAgenda->setClasse(null);
  441.             }
  442.         }
  443.         return $this;
  444.     }
  445.     /**
  446.      * @return Collection<int, SubSequence>
  447.      */
  448.     public function getSubSequences(): Collection
  449.     {
  450.         return $this->subSequences;
  451.     }
  452.     public function addSubSequence(SubSequence $subSequence): static
  453.     {
  454.         if (!$this->subSequences->contains($subSequence)) {
  455.             $this->subSequences->add($subSequence);
  456.             $subSequence->setClasse($this);
  457.         }
  458.         return $this;
  459.     }
  460.     public function removeSubSequence(SubSequence $subSequence): static
  461.     {
  462.         if ($this->subSequences->removeElement($subSequence)) {
  463.             // set the owning side to null (unless already changed)
  464.             if ($subSequence->getClasse() === $this) {
  465.                 $subSequence->setClasse(null);
  466.             }
  467.         }
  468.         return $this;
  469.     }
  470.     /**
  471.      * @return Collection<int, Quarter>
  472.      */
  473.     public function getQuarters(): Collection
  474.     {
  475.         return $this->quarters;
  476.     }
  477.     public function addQuarter(Quarter $quarter): static
  478.     {
  479.         if (!$this->quarters->contains($quarter)) {
  480.             $this->quarters->add($quarter);
  481.             $quarter->setClasse($this);
  482.         }
  483.         return $this;
  484.     }
  485.     public function removeQuarter(Quarter $quarter): static
  486.     {
  487.         if ($this->quarters->removeElement($quarter)) {
  488.             // set the owning side to null (unless already changed)
  489.             if ($quarter->getClasse() === $this) {
  490.                 $quarter->setClasse(null);
  491.             }
  492.         }
  493.         return $this;
  494.     }
  495.     /**
  496.      * @return Collection<int, SubNote>
  497.      */
  498.     public function getSubNotes(): Collection
  499.     {
  500.         return $this->subNotes;
  501.     }
  502.     public function addSubNote(SubNote $subNote): static
  503.     {
  504.         if (!$this->subNotes->contains($subNote)) {
  505.             $this->subNotes->add($subNote);
  506.             $subNote->setClasse($this);
  507.         }
  508.         return $this;
  509.     }
  510.     public function removeSubNote(SubNote $subNote): static
  511.     {
  512.         if ($this->subNotes->removeElement($subNote)) {
  513.             // set the owning side to null (unless already changed)
  514.             if ($subNote->getClasse() === $this) {
  515.                 $subNote->setClasse(null);
  516.             }
  517.         }
  518.         return $this;
  519.     }
  520.     /**
  521.      * @return Collection<int, Punish>
  522.      */
  523.     public function getPunishes(): Collection
  524.     {
  525.         return $this->punishes;
  526.     }
  527.     public function addPunish(Punish $punish): static
  528.     {
  529.         if (!$this->punishes->contains($punish)) {
  530.             $this->punishes->add($punish);
  531.             $punish->setClass($this);
  532.         }
  533.         return $this;
  534.     }
  535.     /**
  536.      * @return Collection<int, DisciplineWarning>
  537.      */
  538.     public function getDisciplineWarnings(): Collection
  539.     {
  540.         return $this->disciplineWarnings;
  541.     }
  542.     public function addDisciplineWarning(DisciplineWarning $disciplineWarning): static
  543.     {
  544.         if (!$this->disciplineWarnings->contains($disciplineWarning)) {
  545.             $this->disciplineWarnings->add($disciplineWarning);
  546.             $disciplineWarning->setClasse($this);
  547.         }
  548.         return $this;
  549.     }
  550.     public function removePunish(Punish $punish): static
  551.     {
  552.         if ($this->punishes->removeElement($punish)) {
  553.             // set the owning side to null (unless already changed)
  554.             if ($punish->getClass() === $this) {
  555.                 $punish->setClass(null);
  556.             }
  557.             return $this;
  558.         }
  559.     }
  560.     public function removeDisciplineWarning(DisciplineWarning $disciplineWarning): static
  561.     {
  562.         if ($this->disciplineWarnings->removeElement($disciplineWarning)) {
  563.             // set the owning side to null (unless already changed)
  564.             if ($disciplineWarning->getClasse() === $this) {
  565.                 $disciplineWarning->setClasse(null);
  566.             }
  567.         }
  568.         return $this;
  569.     }
  570.     /**
  571.      * @return Collection<int, DisciplineBlame>
  572.      */
  573.     public function getDisciplineBlames(): Collection
  574.     {
  575.         return $this->disciplineBlames;
  576.     }
  577.     public function addDisciplineBlame(DisciplineBlame $disciplineBlame): static
  578.     {
  579.         if (!$this->disciplineBlames->contains($disciplineBlame)) {
  580.             $this->disciplineBlames->add($disciplineBlame);
  581.             $disciplineBlame->setClasse($this);
  582.         }
  583.         return $this;
  584.     }
  585.     public function removeDisciplineBlame(DisciplineBlame $disciplineBlame): static
  586.     {
  587.         if ($this->disciplineBlames->removeElement($disciplineBlame)) {
  588.             // set the owning side to null (unless already changed)
  589.             if ($disciplineBlame->getClasse() === $this) {
  590.                 $disciplineBlame->setClasse(null);
  591.             }
  592.         }
  593.         return $this;
  594.     }
  595.     /**
  596.      * @return Collection<int, DisciplineExclusion>
  597.      */
  598.     public function getDisciplineExclusions(): Collection
  599.     {
  600.         return $this->disciplineExclusions;
  601.     }
  602.     public function addDisciplineExclusion(DisciplineExclusion $disciplineExclusion): static
  603.     {
  604.         if (!$this->disciplineExclusions->contains($disciplineExclusion)) {
  605.             $this->disciplineExclusions->add($disciplineExclusion);
  606.             $disciplineExclusion->setClasse($this);
  607.         }
  608.         return $this;
  609.     }
  610.     public function removeDisciplineExclusion(DisciplineExclusion $disciplineExclusion): static
  611.     {
  612.         if ($this->disciplineExclusions->removeElement($disciplineExclusion)) {
  613.             // set the owning side to null (unless already changed)
  614.             if ($disciplineExclusion->getClasse() === $this) {
  615.                 $disciplineExclusion->setClasse(null);
  616.             }
  617.         }
  618.         return $this;
  619.     }
  620.     /**
  621.      * @return Collection<int, ParentNote>
  622.      */
  623.     public function getParentNotes(): Collection
  624.     {
  625.         return $this->parentNotes;
  626.     }
  627.     public function addParentNote(ParentNote $parentNote): static
  628.     {
  629.         if (!$this->parentNotes->contains($parentNote)) {
  630.             $this->parentNotes->add($parentNote);
  631.             $parentNote->setClasse($this);
  632.         }
  633.         return $this;
  634.     }
  635.     public function removeParentNote(ParentNote $parentNote): static
  636.     {
  637.         if ($this->parentNotes->removeElement($parentNote)) {
  638.             // set the owning side to null (unless already changed)
  639.             if ($parentNote->getClasse() === $this) {
  640.                 $parentNote->setClasse(null);
  641.             }
  642.         }
  643.         return $this;
  644.     }
  645.     /**
  646.      * @return Collection<int, Absence>
  647.      */
  648.     public function getAbsences(): Collection
  649.     {
  650.         return $this->absences;
  651.     }
  652.     public function addAbsence(Absence $absence): static
  653.     {
  654.         if (!$this->absences->contains($absence)) {
  655.             $this->absences->add($absence);
  656.             $absence->setClasse($this);
  657.         }
  658.         return $this;
  659.     }
  660.     public function removeAbsence(Absence $absence): static
  661.     {
  662.         if ($this->absences->removeElement($absence)) {
  663.             // set the owning side to null (unless already changed)
  664.             if ($absence->getClasse() === $this) {
  665.                 $absence->setClasse(null);
  666.             }
  667.         }
  668.         return $this;
  669.     }
  670.     /**
  671.      * @return Collection<int, DisciplineRetained>
  672.      */
  673.     public function getDisciplineRetaineds(): Collection
  674.     {
  675.         return $this->disciplineRetaineds;
  676.     }
  677.     public function addDisciplineRetained(DisciplineRetained $disciplineRetained): static
  678.     {
  679.         if (!$this->disciplineRetaineds->contains($disciplineRetained)) {
  680.             $this->disciplineRetaineds->add($disciplineRetained);
  681.             $disciplineRetained->setClasse($this);
  682.         }
  683.         return $this;
  684.     }
  685.     public function removeDisciplineRetained(DisciplineRetained $disciplineRetained): static
  686.     {
  687.         if ($this->disciplineRetaineds->removeElement($disciplineRetained)) {
  688.             // set the owning side to null (unless already changed)
  689.             if ($disciplineRetained->getClasse() === $this) {
  690.                 $disciplineRetained->setClasse(null);
  691.             }
  692.         }
  693.         return $this;
  694.     }
  695.     public function getProf(): ?User
  696.     {
  697.         return $this->prof;
  698.     }
  699.     public function setProf(?User $prof): static
  700.     {
  701.         $this->prof $prof;
  702.         return $this;
  703.     }
  704.     /**
  705.      * @return Collection<int, PrimaryParentNote>
  706.      */
  707.     public function getPrimaryParentNotes(): Collection
  708.     {
  709.         return $this->primaryParentNotes;
  710.     }
  711.     public function addPrimaryParentNote(PrimaryParentNote $primaryParentNote): static
  712.     {
  713.         if (!$this->primaryParentNotes->contains($primaryParentNote)) {
  714.             $this->primaryParentNotes->add($primaryParentNote);
  715.             $primaryParentNote->setClasse($this);
  716.         }
  717.         return $this;
  718.     }
  719.     public function removePrimaryParentNote(PrimaryParentNote $primaryParentNote): static
  720.     {
  721.         if ($this->primaryParentNotes->removeElement($primaryParentNote)) {
  722.             // set the owning side to null (unless already changed)
  723.             if ($primaryParentNote->getClasse() === $this) {
  724.                 $primaryParentNote->setClasse(null);
  725.             }
  726.         }
  727.         return $this;
  728.     }
  729.     /**
  730.      * @return Collection<int, PrimaryNote>
  731.      */
  732.     public function getPrimaryNotes(): Collection
  733.     {
  734.         return $this->primaryNotes;
  735.     }
  736.     public function addPrimaryNote(PrimaryNote $primaryNote): static
  737.     {
  738.         if (!$this->primaryNotes->contains($primaryNote)) {
  739.             $this->primaryNotes->add($primaryNote);
  740.             $primaryNote->setClasse($this);
  741.         }
  742.         return $this;
  743.     }
  744.     public function removePrimaryNote(PrimaryNote $primaryNote): static
  745.     {
  746.         if ($this->primaryNotes->removeElement($primaryNote)) {
  747.             // set the owning side to null (unless already changed)
  748.             if ($primaryNote->getClasse() === $this) {
  749.                 $primaryNote->setClasse(null);
  750.             }
  751.         }
  752.         return $this;
  753.     }
  754.     /**
  755.      * @return Collection<int, DisciplinePunish>
  756.      */
  757.     public function getDisciplinePunishes(): Collection
  758.     {
  759.         return $this->disciplinePunishes;
  760.     }
  761.     public function addDisciplinePunish(DisciplinePunish $disciplinePunish): static
  762.     {
  763.         if (!$this->disciplinePunishes->contains($disciplinePunish)) {
  764.             $this->disciplinePunishes->add($disciplinePunish);
  765.             $disciplinePunish->setClasse($this);
  766.         }
  767.         return $this;
  768.     }
  769.     public function removeDisciplinePunish(DisciplinePunish $disciplinePunish): static
  770.     {
  771.         if ($this->disciplinePunishes->removeElement($disciplinePunish)) {
  772.             // set the owning side to null (unless already changed)
  773.             if ($disciplinePunish->getClasse() === $this) {
  774.                 $disciplinePunish->setClasse(null);
  775.             }
  776.         }
  777.         return $this;
  778.     }
  779.     /**
  780.      * @return Collection<int, Late>
  781.      */
  782.     public function getLates(): Collection
  783.     {
  784.         return $this->lates;
  785.     }
  786.     public function addLate(Late $late): static
  787.     {
  788.         if (!$this->lates->contains($late)) {
  789.             $this->lates->add($late);
  790.             $late->setClasse($this);
  791.         }
  792.         return $this;
  793.     }
  794.     public function removeLate(Late $late): static
  795.     {
  796.         if ($this->lates->removeElement($late)) {
  797.             // set the owning side to null (unless already changed)
  798.             if ($late->getClasse() === $this) {
  799.                 $late->setClasse(null);
  800.             }
  801.         }
  802.         return $this;
  803.     }
  804.     /**
  805.      * @return Collection<int, Blame>
  806.      */
  807.     public function getBlames(): Collection
  808.     {
  809.         return $this->blames;
  810.     }
  811.     public function addBlame(Blame $blame): static
  812.     {
  813.         if (!$this->blames->contains($blame)) {
  814.             $this->blames->add($blame);
  815.             $blame->setClasse($this);
  816.         }
  817.         return $this;
  818.     }
  819.     public function removeBlame(Blame $blame): static
  820.     {
  821.         if ($this->blames->removeElement($blame)) {
  822.             // set the owning side to null (unless already changed)
  823.             if ($blame->getClasse() === $this) {
  824.                 $blame->setClasse(null);
  825.             }
  826.         }
  827.         return $this;
  828.     }
  829.     /**
  830.      * @return Collection<int, Warning>
  831.      */
  832.     public function getWarnings(): Collection
  833.     {
  834.         return $this->warnings;
  835.     }
  836.     public function addWarning(Warning $warning): static
  837.     {
  838.         if (!$this->warnings->contains($warning)) {
  839.             $this->warnings->add($warning);
  840.             $warning->setClasse($this);
  841.         }
  842.         return $this;
  843.     }
  844.     public function removeWarning(Warning $warning): static
  845.     {
  846.         if ($this->warnings->removeElement($warning)) {
  847.             // set the owning side to null (unless already changed)
  848.             if ($warning->getClasse() === $this) {
  849.                 $warning->setClasse(null);
  850.             }
  851.         }
  852.         return $this;
  853.     }
  854.     /**
  855.      * @return Collection<int, Retained>
  856.      */
  857.     public function getRetaineds(): Collection
  858.     {
  859.         return $this->retaineds;
  860.     }
  861.     public function addRetained(Retained $retained): static
  862.     {
  863.         if (!$this->retaineds->contains($retained)) {
  864.             $this->retaineds->add($retained);
  865.             $retained->setClasse($this);
  866.         }
  867.         return $this;
  868.     }
  869.     public function removeRetained(Retained $retained): static
  870.     {
  871.         if ($this->retaineds->removeElement($retained)) {
  872.             // set the owning side to null (unless already changed)
  873.             if ($retained->getClasse() === $this) {
  874.                 $retained->setClasse(null);
  875.             }
  876.         }
  877.         return $this;
  878.     }
  879.     public function getSlug(): ?string
  880.     {
  881.         return $this->slug;
  882.     }
  883.     public function setSlug(?string $slug): static
  884.     {
  885.         $this->slug $slug;
  886.         return $this;
  887.     }
  888.     /**
  889.      * @return Collection<int, DisciplineConcile>
  890.      */
  891.     public function getDisciplineConciles(): Collection
  892.     {
  893.         return $this->disciplineConciles;
  894.     }
  895.     public function addDisciplineConcile(DisciplineConcile $disciplineConcile): static
  896.     {
  897.         if (!$this->disciplineConciles->contains($disciplineConcile)) {
  898.             $this->disciplineConciles->add($disciplineConcile);
  899.             $disciplineConcile->setClasse($this);
  900.         }
  901.         return $this;
  902.     }
  903.     public function removeDisciplineConcile(DisciplineConcile $disciplineConcile): static
  904.     {
  905.         if ($this->disciplineConciles->removeElement($disciplineConcile)) {
  906.             // set the owning side to null (unless already changed)
  907.             if ($disciplineConcile->getClasse() === $this) {
  908.                 $disciplineConcile->setClasse(null);
  909.             }
  910.         }
  911.         return $this;
  912.     }
  913.     public function getPrincipalProf(): ?UserYear
  914.     {
  915.         return $this->principalProf;
  916.     }
  917.     public function setPrincipalProf(?UserYear $principalProf): static
  918.     {
  919.         $this->principalProf $principalProf;
  920.         return $this;
  921.     }
  922.     /**
  923.      * @return Collection<int, AgendaDay>
  924.      */
  925.     public function getAgendaDays(): Collection
  926.     {
  927.         return $this->agendaDays;
  928.     }
  929.     public function addAgendaDay(AgendaDay $agendaDay): static
  930.     {
  931.         if (!$this->agendaDays->contains($agendaDay)) {
  932.             $this->agendaDays->add($agendaDay);
  933.             $agendaDay->setClasse($this);
  934.         }
  935.         return $this;
  936.     }
  937.     public function removeAgendaDay(AgendaDay $agendaDay): static
  938.     {
  939.         if ($this->agendaDays->removeElement($agendaDay)) {
  940.             // set the owning side to null (unless already changed)
  941.             if ($agendaDay->getClasse() === $this) {
  942.                 $agendaDay->setClasse(null);
  943.             }
  944.         }
  945.         return $this;
  946.     }
  947.     /**
  948.      * @return Collection<int, Competence>
  949.      */
  950.     public function getCompetences(): Collection
  951.     {
  952.         return $this->competences;
  953.     }
  954.     public function addCompetence(Competence $competence): static
  955.     {
  956.         if (!$this->competences->contains($competence)) {
  957.             $this->competences->add($competence);
  958.             $competence->setClasse($this);
  959.         }
  960.         return $this;
  961.     }
  962.     public function removeCompetence(Competence $competence): static
  963.     {
  964.         if ($this->competences->removeElement($competence)) {
  965.             // set the owning side to null (unless already changed)
  966.             if ($competence->getClasse() === $this) {
  967.                 $competence->setClasse(null);
  968.             }
  969.         }
  970.         return $this;
  971.     }
  972.     /**
  973.      * @return Collection<int, WeekSubjectGoal>
  974.      */
  975.     public function getWeekSubjectGoals(): Collection
  976.     {
  977.         return $this->weekSubjectGoals;
  978.     }
  979.     public function addWeekSubjectGoal(WeekSubjectGoal $weekSubjectGoal): static
  980.     {
  981.         if (!$this->weekSubjectGoals->contains($weekSubjectGoal)) {
  982.             $this->weekSubjectGoals->add($weekSubjectGoal);
  983.             $weekSubjectGoal->setClasse($this);
  984.         }
  985.         return $this;
  986.     }
  987.     public function removeWeekSubjectGoal(WeekSubjectGoal $weekSubjectGoal): static
  988.     {
  989.         if ($this->weekSubjectGoals->removeElement($weekSubjectGoal)) {
  990.             // set the owning side to null (unless already changed)
  991.             if ($weekSubjectGoal->getClasse() === $this) {
  992.                 $weekSubjectGoal->setClasse(null);
  993.             }
  994.         }
  995.         return $this;
  996.     }
  997.     /**
  998.      * @return Collection<int, AgendaElement>
  999.      */
  1000.     public function getAgendaElements(): Collection
  1001.     {
  1002.         return $this->agendaElements;
  1003.     }
  1004.     public function addAgendaElement(AgendaElement $agendaElement): static
  1005.     {
  1006.         if (!$this->agendaElements->contains($agendaElement)) {
  1007.             $this->agendaElements->add($agendaElement);
  1008.             $agendaElement->setClasse($this);
  1009.         }
  1010.         return $this;
  1011.     }
  1012.     public function removeAgendaElement(AgendaElement $agendaElement): static
  1013.     {
  1014.         if ($this->agendaElements->removeElement($agendaElement)) {
  1015.             // set the owning side to null (unless already changed)
  1016.             if ($agendaElement->getClasse() === $this) {
  1017.                 $agendaElement->setClasse(null);
  1018.             }
  1019.         }
  1020.         return $this;
  1021.     }
  1022. }