src/Entity/TheClass.php line 16

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