src/Entity/SchoolYear.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SchoolYearRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use App\Entity\Traits\Timestampable;
  10. #[ORM\HasLifecycleCallbacks]
  11. #[ORM\Entity(repositoryClassSchoolYearRepository::class)]
  12. #[UniqueEntity(fields: ['name'], message'cette année existe deja')]
  13. class SchoolYear
  14. {
  15.     use Timestampable;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue]
  18.     #[ORM\Column]
  19.     private ?int $id null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $name null;
  22.     #[ORM\Column]
  23.     private ?bool $active null;
  24.     #[ORM\OneToMany(mappedBy'year'targetEntityUserYear::class)]
  25.     private Collection $userYears;
  26.     #[ORM\OneToMany(mappedBy'year'targetEntityStudentYear::class)]
  27.     private Collection $studentYears;
  28.     #[ORM\OneToMany(mappedBy'year'targetEntityHomeWork::class)]
  29.     private Collection $homeWorks;
  30.     #[ORM\OneToMany(mappedBy'year'targetEntityHomeWorkYear::class)]
  31.     private Collection $homeWorkYears;
  32.     #[ORM\OneToMany(mappedBy'year'targetEntityLate::class)]
  33.     private Collection $lates;
  34.     #[ORM\OneToMany(mappedBy'year'targetEntityChat::class)]
  35.     private Collection $chats;
  36.     #[ORM\OneToMany(mappedBy'year'targetEntityAbsence::class)]
  37.     private Collection $absences;
  38.     #[ORM\OneToMany(mappedBy'year'targetEntityNote::class)]
  39.     private Collection $notes;
  40.     #[ORM\OneToMany(mappedBy'year'targetEntityExams::class)]
  41.     private Collection $exams;
  42.     #[ORM\OneToMany(mappedBy'year'targetEntityDocInfo::class)]
  43.     private Collection $docInfos;
  44.     #[ORM\ManyToOne(inversedBy'schoolYears'cascade: ["persist"])]
  45.     private ?User $author null;
  46.     #[ORM\ManyToOne(inversedBy'schoolYearsEdited'cascade: ["persist"])]
  47.     private ?User $editor null;
  48.     #[ORM\OneToMany(mappedBy'year'targetEntityPunish::class)]
  49.     private Collection $punishes;
  50.     #[ORM\OneToMany(mappedBy'year'targetEntityDiscussion::class)]
  51.     private Collection $discussions;
  52.     #[ORM\OneToMany(mappedBy'year'targetEntityDiscussionClass::class)]
  53.     private Collection $discussionClasses;
  54.     #[ORM\OneToMany(mappedBy'year'targetEntityAgenda::class)]
  55.     private Collection $agendas;
  56.     #[ORM\OneToMany(mappedBy'year'targetEntityExamAgenda::class)]
  57.     private Collection $examAgendas;
  58.     #[ORM\OneToMany(mappedBy'year'targetEntityQuarter::class, orphanRemovaltrue)]
  59.     private Collection $quarters;
  60.     #[ORM\OneToMany(mappedBy'year'targetEntityGlobalQuarter::class)]
  61.     private Collection $globalQuarters;
  62.     #[ORM\OneToMany(mappedBy'year'targetEntityAppreciation::class, orphanRemovaltrue)]
  63.     private Collection $appreciations;
  64.     #[ORM\OneToMany(mappedBy'year'targetEntityLocalAccount::class)]
  65.     private Collection $localAccounts;
  66.     #[ORM\OneToMany(mappedBy'year'targetEntityDisciplineWarning::class)]
  67.     private Collection $disciplineWarnings;
  68.     #[ORM\OneToMany(mappedBy'year'targetEntityDisciplineBlame::class)]
  69.     private Collection $disciplineBlames;
  70.     #[ORM\OneToMany(mappedBy'year'targetEntityDisciplineExclusion::class)]
  71.     private Collection $disciplineExclusions;
  72.     #[ORM\OneToMany(mappedBy'year'targetEntityParentNote::class)]
  73.     private Collection $parentNotes;
  74.     #[ORM\OneToMany(mappedBy'year'targetEntityJustifyAbsence::class)]
  75.     private Collection $justifyAbsences;
  76.     #[ORM\OneToMany(mappedBy'year'targetEntitySubject::class)]
  77.     private Collection $subjects;
  78.     /**
  79.      * Versions du programme national (SubjectReference) associées à
  80.      * cette année scolaire. Permet de faire évoluer le programme
  81.      * d'une année à l'autre sans perdre l'historique.
  82.      */
  83.     #[ORM\OneToMany(mappedBy'year'targetEntitySubjectReference::class)]
  84.     private Collection $subjectReferences;
  85.     #[ORM\OneToMany(mappedBy'year'targetEntityAbsenceRetainedConfig::class)]
  86.     private Collection $absenceRetainedConfigs;
  87.     #[ORM\OneToMany(mappedBy'year'targetEntityAbsenceWarningConfig::class)]
  88.     private Collection $absenceWarningConfigs;
  89.     #[ORM\OneToMany(mappedBy'year'targetEntityAbsenceExclusionConfig::class)]
  90.     private Collection $absenceExclusionConfigs;
  91.     #[ORM\OneToMany(mappedBy'year'targetEntityAbsenceBlameConfig::class)]
  92.     private Collection $absenceBlameConfigs;
  93.     #[ORM\OneToMany(mappedBy'year'targetEntityDisciplineRetained::class)]
  94.     private Collection $disciplineRetaineds;
  95.     #[ORM\OneToMany(mappedBy'year'targetEntityDefinitiveExclusion::class)]
  96.     private Collection $definitiveExclusions;
  97.     #[ORM\OneToMany(mappedBy'year'targetEntityDisciplineConcile::class)]
  98.     private Collection $disciplineConciles;
  99.     #[ORM\OneToMany(mappedBy'year'targetEntityAbsenceDisciplineConcileConfig::class)]
  100.     private Collection $absenceDisciplineConcileConfigs;
  101.     #[ORM\OneToMany(mappedBy'year'targetEntityWarningBlameConfig::class)]
  102.     private Collection $warningBlameConfigs;
  103.     #[ORM\OneToMany(mappedBy'year'targetEntityWarningDefinitiveExlusionConfig::class)]
  104.     private Collection $warningDefinitiveExlusionConfigs;
  105.     #[ORM\OneToMany(mappedBy'year'targetEntityPrimaryParentNote::class)]
  106.     private Collection $primaryParentNotes;
  107.     #[ORM\OneToMany(mappedBy'year'targetEntityPrimaryNote::class)]
  108.     private Collection $primaryNotes;
  109.     #[ORM\OneToMany(mappedBy'year'targetEntityVerbalProcessCategory::class)]
  110.     private Collection $verbalProcessCategories;
  111.     #[ORM\OneToMany(mappedBy'year'targetEntityGlobalDisciplineConfig::class)]
  112.     private Collection $globalDisciplineConfigs;
  113.     #[ORM\OneToMany(mappedBy'year'targetEntityDisciplinePunish::class)]
  114.     private Collection $disciplinePunishes;
  115.     #[ORM\OneToMany(mappedBy'year'targetEntityGlobalDisciplineEnabledConfig::class)]
  116.     private Collection $globalDisciplineEnabledConfigs;
  117.     #[ORM\OneToMany(mappedBy'year'targetEntityBlamePunishConfig::class)]
  118.     private Collection $blamePunishConfigs;
  119.     #[ORM\OneToMany(mappedBy'year'targetEntityAbsencePunishConfig::class)]
  120.     private Collection $absencePunishConfigs;
  121.     #[ORM\OneToMany(mappedBy'year'targetEntityWarningPunishConfig::class)]
  122.     private Collection $warningPunishConfigs;
  123.     #[ORM\OneToMany(mappedBy'year'targetEntityPunishRetainedConfig::class)]
  124.     private Collection $punishRetainedConfigs;
  125.     #[ORM\OneToMany(mappedBy'year'targetEntityPunishWarningConfig::class)]
  126.     private Collection $punishWarningConfigs;
  127.     #[ORM\OneToMany(mappedBy'year'targetEntityPunishBlameConfig::class)]
  128.     private Collection $punishBlameConfigs;
  129.     #[ORM\OneToMany(mappedBy'year'targetEntityPunishExclusionConfig::class)]
  130.     private Collection $punishExclusionConfigs;
  131.     #[ORM\Column(length255)]
  132.     private ?string $nameEn null;
  133.     #[ORM\OneToMany(mappedBy'year'targetEntitySchoolYearInfos::class)]
  134.     private Collection $schoolYearInfos;
  135.     #[ORM\OneToMany(mappedBy'year'targetEntityBlame::class)]
  136.     private Collection $blames;
  137.     #[ORM\OneToMany(mappedBy'year'targetEntityWarning::class)]
  138.     private Collection $warnings;
  139.     #[ORM\OneToMany(mappedBy'year'targetEntityRetained::class)]
  140.     private Collection $retaineds;
  141.     #[ORM\OneToMany(mappedBy'year'targetEntityHonnorTableLimitMoy::class)]
  142.     private Collection $honnorTableLimitMoys;
  143.     #[ORM\OneToMany(mappedBy'year'targetEntityNews::class)]
  144.     private Collection $news;
  145.     #[ORM\OneToMany(mappedBy'year'targetEntityEvent::class)]
  146.     private Collection $events;
  147.     #[ORM\OneToMany(mappedBy'year'targetEntityAdmissionLimit::class)]
  148.     private Collection $admissionLimits;
  149.     #[ORM\OneToOne(mappedBy'year'cascade: ['persist'])]
  150.     private ?AgendaTimeConvertion $agendaTimeConvertion null;
  151.     #[ORM\OneToMany(mappedBy'year'targetEntityExamWeek::class)]
  152.     private Collection $examWeeks;
  153.     #[ORM\OneToMany(mappedBy'year'targetEntityCompetence::class)]
  154.     private Collection $competences;
  155.     #[ORM\OneToMany(mappedBy'year'targetEntityWeekSubjectGoal::class)]
  156.     private Collection $weekSubjectGoals;
  157.     #[ORM\OneToMany(mappedBy'year'targetEntityProfSchoolPlanner::class)]
  158.     private Collection $profSchoolPlanners;
  159.     #[ORM\OneToMany(mappedBy'year'targetEntityProfTime::class)]
  160.     private Collection $profTimes;
  161.     #[ORM\OneToMany(mappedBy'year'targetEntitySchoolPlannerType::class)]
  162.     private Collection $schoolPlannerTypes;
  163.     #[ORM\OneToMany(mappedBy'year'targetEntityAgendaElement::class)]
  164.     private Collection $agendaElements;
  165.     #[ORM\OneToMany(mappedBy'year'targetEntityGlobalSchoolBreak::class)]
  166.     private Collection $globalSchoolBreaks;
  167.     #[ORM\OneToMany(mappedBy'year'targetEntityTeacherAbsence::class, orphanRemovaltrue)]
  168.     private Collection $teacherAbsences;
  169.     #[ORM\OneToMany(mappedBy'year'targetEntityAttendanceMissed::class)]
  170.     private Collection $attendanceMisseds;
  171.     #[ORM\OneToMany(mappedBy'year'targetEntityGeneralBreak::class, orphanRemovaltrue)]
  172.     private Collection $generalBreaks;
  173.     #[ORM\Column(nullabletrue)]
  174.     private ?int $level null;
  175.     public function __construct()
  176.     {
  177.         $this->userYears = new ArrayCollection();
  178.         $this->studentYears = new ArrayCollection();
  179.         $this->homeWorks = new ArrayCollection();
  180.         $this->homeWorkYears = new ArrayCollection();
  181.         $this->lates = new ArrayCollection();
  182.         $this->chats = new ArrayCollection();
  183.         $this->absences = new ArrayCollection();
  184.         $this->notes = new ArrayCollection();
  185.         $this->exams = new ArrayCollection();
  186.         $this->docInfos = new ArrayCollection();
  187.         $this->punishes = new ArrayCollection();
  188.         $this->discussions = new ArrayCollection();
  189.         $this->discussionClasses = new ArrayCollection();
  190.         $this->agendas = new ArrayCollection();
  191.         $this->examAgendas = new ArrayCollection();
  192.         $this->quarters = new ArrayCollection();
  193.         $this->globalQuarters = new ArrayCollection();
  194.         $this->appreciations = new ArrayCollection();
  195.         $this->localAccounts = new ArrayCollection();
  196.         $this->disciplineWarnings = new ArrayCollection();
  197.         $this->disciplineBlames = new ArrayCollection();
  198.         $this->disciplineExclusions = new ArrayCollection();
  199.         $this->parentNotes = new ArrayCollection();
  200.         $this->justifyAbsences = new ArrayCollection();
  201.         $this->subjects = new ArrayCollection();
  202.         $this->subjectReferences = new ArrayCollection();
  203.         $this->absenceRetainedConfigs = new ArrayCollection();
  204.         $this->absenceWarningConfigs = new ArrayCollection();
  205.         $this->absenceExclusionConfigs = new ArrayCollection();
  206.         $this->absenceBlameConfigs = new ArrayCollection();
  207.         $this->disciplineRetaineds = new ArrayCollection();
  208.         $this->definitiveExclusions = new ArrayCollection();
  209.         $this->disciplineConciles = new ArrayCollection();
  210.         $this->absenceDisciplineConcileConfigs = new ArrayCollection();
  211.         $this->warningBlameConfigs = new ArrayCollection();
  212.         $this->warningDefinitiveExlusionConfigs = new ArrayCollection();
  213.         $this->primaryParentNotes = new ArrayCollection();
  214.         $this->primaryNotes = new ArrayCollection();
  215.         $this->verbalProcessCategories = new ArrayCollection();
  216.         $this->globalDisciplineConfigs = new ArrayCollection();
  217.         $this->disciplinePunishes = new ArrayCollection();
  218.         $this->globalDisciplineEnabledConfigs = new ArrayCollection();
  219.         $this->blamePunishConfigs = new ArrayCollection();
  220.         $this->absencePunishConfigs = new ArrayCollection();
  221.         $this->warningPunishConfigs = new ArrayCollection();
  222.         $this->punishRetainedConfigs = new ArrayCollection();
  223.         $this->punishWarningConfigs = new ArrayCollection();
  224.         $this->punishBlameConfigs = new ArrayCollection();
  225.         $this->punishExclusionConfigs = new ArrayCollection();
  226.         $this->schoolYearInfos = new ArrayCollection();
  227.         $this->blames = new ArrayCollection();
  228.         $this->warnings = new ArrayCollection();
  229.         $this->retaineds = new ArrayCollection();
  230.         $this->honnorTableLimitMoys = new ArrayCollection();
  231.         $this->news = new ArrayCollection();
  232.         $this->events = new ArrayCollection();
  233.         $this->admissionLimits = new ArrayCollection();
  234.         $this->examWeeks = new ArrayCollection();
  235.         $this->competences = new ArrayCollection();
  236.         $this->weekSubjectGoals = new ArrayCollection();
  237.         $this->profSchoolPlanners = new ArrayCollection();
  238.         $this->profTimes = new ArrayCollection();
  239.         $this->schoolPlannerTypes = new ArrayCollection();
  240.         $this->agendaElements = new ArrayCollection();
  241.         $this->globalSchoolBreaks = new ArrayCollection();
  242.         $this->teacherAbsences = new ArrayCollection();
  243.         $this->attendanceMisseds = new ArrayCollection();
  244.         $this->generalBreaks = new ArrayCollection();
  245.     }
  246.     public function getId(): ?int
  247.     {
  248.         return $this->id;
  249.     }
  250.     public function getName(): ?string
  251.     {
  252.         return $this->name;
  253.     }
  254.     public function setName(string $name): static
  255.     {
  256.         $this->name $name;
  257.         return $this;
  258.     }
  259.     public function isActive(): ?bool
  260.     {
  261.         return $this->active;
  262.     }
  263.     public function setActive(bool $active): static
  264.     {
  265.         $this->active $active;
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return Collection<int, UserYear>
  270.      */
  271.     public function getUserYears(): Collection
  272.     {
  273.         return $this->userYears;
  274.     }
  275.     public function addUserYear(UserYear $userYear): static
  276.     {
  277.         if (!$this->userYears->contains($userYear)) {
  278.             $this->userYears->add($userYear);
  279.             $userYear->setYear($this);
  280.         }
  281.         return $this;
  282.     }
  283.     public function removeUserYear(UserYear $userYear): static
  284.     {
  285.         if ($this->userYears->removeElement($userYear)) {
  286.             // set the owning side to null (unless already changed)
  287.             if ($userYear->getYear() === $this) {
  288.                 $userYear->setYear(null);
  289.             }
  290.         }
  291.         return $this;
  292.     }
  293.     /**
  294.      * @return Collection<int, StudentYear>
  295.      */
  296.     public function getStudentYears(): Collection
  297.     {
  298.         return $this->studentYears;
  299.     }
  300.     public function addStudentYear(StudentYear $studentYear): static
  301.     {
  302.         if (!$this->studentYears->contains($studentYear)) {
  303.             $this->studentYears->add($studentYear);
  304.             $studentYear->setYear($this);
  305.         }
  306.         return $this;
  307.     }
  308.     public function removeStudentYear(StudentYear $studentYear): static
  309.     {
  310.         if ($this->studentYears->removeElement($studentYear)) {
  311.             // set the owning side to null (unless already changed)
  312.             if ($studentYear->getYear() === $this) {
  313.                 $studentYear->setYear(null);
  314.             }
  315.         }
  316.         return $this;
  317.     }
  318.     /**
  319.      * @return Collection<int, HomeWork>
  320.      */
  321.     public function getHomeWorks(): Collection
  322.     {
  323.         return $this->homeWorks;
  324.     }
  325.     public function addHomeWork(HomeWork $homeWork): static
  326.     {
  327.         if (!$this->homeWorks->contains($homeWork)) {
  328.             $this->homeWorks->add($homeWork);
  329.             $homeWork->setYear($this);
  330.         }
  331.         return $this;
  332.     }
  333.     public function removeHomeWork(HomeWork $homeWork): static
  334.     {
  335.         if ($this->homeWorks->removeElement($homeWork)) {
  336.             // set the owning side to null (unless already changed)
  337.             if ($homeWork->getYear() === $this) {
  338.                 $homeWork->setYear(null);
  339.             }
  340.         }
  341.         return $this;
  342.     }
  343.     /**
  344.      * @return Collection<int, HomeWorkYear>
  345.      */
  346.     public function getHomeWorkYears(): Collection
  347.     {
  348.         return $this->homeWorkYears;
  349.     }
  350.     public function addHomeWorkYear(HomeWorkYear $homeWorkYear): static
  351.     {
  352.         if (!$this->homeWorkYears->contains($homeWorkYear)) {
  353.             $this->homeWorkYears->add($homeWorkYear);
  354.             $homeWorkYear->setYear($this);
  355.         }
  356.         return $this;
  357.     }
  358.     public function removeHomeWorkYear(HomeWorkYear $homeWorkYear): static
  359.     {
  360.         if ($this->homeWorkYears->removeElement($homeWorkYear)) {
  361.             // set the owning side to null (unless already changed)
  362.             if ($homeWorkYear->getYear() === $this) {
  363.                 $homeWorkYear->setYear(null);
  364.             }
  365.         }
  366.         return $this;
  367.     }
  368.     /**
  369.      * @return Collection<int, Late>
  370.      */
  371.     public function getLates(): Collection
  372.     {
  373.         return $this->lates;
  374.     }
  375.     public function addLate(Late $late): static
  376.     {
  377.         if (!$this->lates->contains($late)) {
  378.             $this->lates->add($late);
  379.             $late->setYear($this);
  380.         }
  381.         return $this;
  382.     }
  383.     public function removeLate(Late $late): static
  384.     {
  385.         if ($this->lates->removeElement($late)) {
  386.             // set the owning side to null (unless already changed)
  387.             if ($late->getYear() === $this) {
  388.                 $late->setYear(null);
  389.             }
  390.         }
  391.         return $this;
  392.     }
  393.     /**
  394.      * @return Collection<int, Chat>
  395.      */
  396.     public function getChats(): Collection
  397.     {
  398.         return $this->chats;
  399.     }
  400.     public function addChat(Chat $chat): static
  401.     {
  402.         if (!$this->chats->contains($chat)) {
  403.             $this->chats->add($chat);
  404.             $chat->setYear($this);
  405.         }
  406.     }
  407.     /** 
  408.      * @return Collection<int, Absence>
  409.     */
  410.     public function getAbsences(): Collection
  411.     {
  412.         return $this->absences;
  413.     }
  414.     public function addAbsence(Absence $absence): static
  415.     {
  416.         if (!$this->absences->contains($absence)) {
  417.             $this->absences->add($absence);
  418.             $absence->setYear($this);
  419.         }
  420.         return $this;
  421.     }
  422.     public function removeChat(Chat $chat): static
  423.     {
  424.         if ($this->chats->removeElement($chat)) {
  425.             // set the owning side to null (unless already changed)
  426.             if ($chat->getYear() === $this) {
  427.                 $chat->setYear(null);
  428.             }
  429.         }
  430.         return $this;
  431.     }
  432.     public function removeAbsence(Absence $absence): static
  433.     {
  434.         if ($this->absences->removeElement($absence)) {
  435.             // set the owning side to null (unless already changed)
  436.             if ($absence->getYear() === $this) {
  437.                 $absence->setYear(null);
  438.             }
  439.         }
  440.         return $this;
  441.     }
  442.     /**
  443.      * @return Collection<int, Note>
  444.      */
  445.     public function getNotes(): Collection
  446.     {
  447.         return $this->notes;
  448.     }
  449.     public function addNote(Note $note): static
  450.     {
  451.         if (!$this->notes->contains($note)) {
  452.             $this->notes->add($note);
  453.             $note->setYear($this);
  454.         }
  455.         return $this;
  456.     }
  457.     public function removeNote(Note $note): static
  458.     {
  459.         if ($this->notes->removeElement($note)) {
  460.             // set the owning side to null (unless already changed)
  461.             if ($note->getYear() === $this) {
  462.                 $note->setYear(null);
  463.             }
  464.         }
  465.         return $this;
  466.     }
  467.     /**
  468.      * @return Collection<int, Exams>
  469.      */
  470.     public function getExams(): Collection
  471.     {
  472.         return $this->exams;
  473.     }
  474.     public function addExam(Exams $exam): static
  475.     {
  476.         if (!$this->exams->contains($exam)) {
  477.             $this->exams->add($exam);
  478.             $exam->setYear($this);
  479.         }
  480.         return $this;
  481.     }
  482.     public function removeExam(Exams $exam): static
  483.     {
  484.         if ($this->exams->removeElement($exam)) {
  485.             // set the owning side to null (unless already changed)
  486.             if ($exam->getYear() === $this) {
  487.                 $exam->setYear(null);
  488.             }
  489.         }
  490.         return $this;
  491.     }
  492.     /**
  493.      * @return Collection<int, DocInfo>
  494.      */
  495.     public function getDocInfos(): Collection
  496.     {
  497.         return $this->docInfos;
  498.     }
  499.     public function addDocInfo(DocInfo $docInfo): static
  500.     {
  501.         if (!$this->docInfos->contains($docInfo)) {
  502.             $this->docInfos->add($docInfo);
  503.             $docInfo->setYear($this);
  504.         }
  505.         return $this;
  506.     }
  507.     public function removeDocInfo(DocInfo $docInfo): static
  508.     {
  509.         if ($this->docInfos->removeElement($docInfo)) {
  510.             // set the owning side to null (unless already changed)
  511.             if ($docInfo->getYear() === $this) {
  512.                 $docInfo->setYear(null);
  513.             }
  514.         }
  515.         return $this;
  516.     }
  517.     public function getAuthor(): ?User
  518.     {
  519.         return $this->author;
  520.     }
  521.     public function setAuthor(?User $author): static
  522.     {
  523.         $this->author $author;
  524.         return $this;
  525.     }
  526.     
  527.     /**
  528.      * @return Collection<int, Punish>
  529.      */
  530.     public function getPunishes(): Collection
  531.     {
  532.         return $this->punishes;
  533.     }
  534.     public function addPunish(Punish $punish): static
  535.     {
  536.         if (!$this->punishes->contains($punish)) {
  537.             $this->punishes->add($punish);
  538.             $punish->setYear($this);
  539.         }
  540.         return $this;
  541.     }
  542.     public function removePunish(Punish $punish): static
  543.     {
  544.         if ($this->punishes->removeElement($punish)) {
  545.             // set the owning side to null (unless already changed)
  546.             if ($punish->getYear() === $this) {
  547.                 $punish->setYear(null);
  548.             }
  549.         }
  550.         return $this;
  551.     }
  552.     public function getEditor(): ?User
  553.     {
  554.         return $this->editor;
  555.     }
  556.     public function setEditor(?User $editor): static
  557.     {
  558.         $this->editor $editor;
  559.         return $this;
  560.     }
  561.     /**
  562.      * @return Collection<int, Discussion>
  563.      */
  564.     public function getDiscussions(): Collection
  565.     {
  566.         return $this->discussions;
  567.     }
  568.     public function addDiscussion(Discussion $discussion): static
  569.     {
  570.         if (!$this->discussions->contains($discussion)) {
  571.             $this->discussions->add($discussion);
  572.             $discussion->setYear($this);
  573.         }
  574.         return $this;
  575.     }
  576.     public function removeDiscussion(Discussion $discussion): static
  577.     {
  578.         if ($this->discussions->removeElement($discussion)) {
  579.             // set the owning side to null (unless already changed)
  580.             if ($discussion->getYear() === $this) {
  581.                 $discussion->setYear(null);
  582.             }
  583.         }
  584.         return $this;
  585.     }
  586.     /**
  587.      * @return Collection<int, DiscussionClass>
  588.      */
  589.     public function getDiscussionClasses(): Collection
  590.     {
  591.         return $this->discussionClasses;
  592.     }
  593.     public function addDiscussionClass(DiscussionClass $discussionClass): static
  594.     {
  595.         if (!$this->discussionClasses->contains($discussionClass)) {
  596.             $this->discussionClasses->add($discussionClass);
  597.             $discussionClass->setYear($this);
  598.         }
  599.         return $this;
  600.     }
  601.     public function removeDiscussionClass(DiscussionClass $discussionClass): static
  602.     {
  603.         if ($this->discussionClasses->removeElement($discussionClass)) {
  604.             // set the owning side to null (unless already changed)
  605.             if ($discussionClass->getYear() === $this) {
  606.                 $discussionClass->setYear(null);
  607.             }
  608.         }
  609.         return $this;
  610.     }
  611.     /**
  612.      * @return Collection<int, Agenda>
  613.      */
  614.     public function getAgendas(): Collection
  615.     {
  616.         return $this->agendas;
  617.     }
  618.     public function addAgenda(Agenda $agenda): static
  619.     {
  620.         if (!$this->agendas->contains($agenda)) {
  621.             $this->agendas->add($agenda);
  622.             $agenda->setYear($this);
  623.         }
  624.         return $this;
  625.     }
  626.     public function removeAgenda(Agenda $agenda): static
  627.     {
  628.         if ($this->agendas->removeElement($agenda)) {
  629.             // set the owning side to null (unless already changed)
  630.             if ($agenda->getYear() === $this) {
  631.                 $agenda->setYear(null);
  632.             }
  633.         }
  634.         return $this;
  635.     }
  636.     /**
  637.      * @return Collection<int, ExamAgenda>
  638.      */
  639.     public function getExamAgendas(): Collection
  640.     {
  641.         return $this->examAgendas;
  642.     }
  643.     public function addExamAgenda(ExamAgenda $examAgenda): static
  644.     {
  645.         if (!$this->examAgendas->contains($examAgenda)) {
  646.             $this->examAgendas->add($examAgenda);
  647.             $examAgenda->setYear($this);
  648.         }
  649.         return $this;
  650.     }
  651.     public function removeExamAgenda(ExamAgenda $examAgenda): static
  652.     {
  653.         if ($this->examAgendas->removeElement($examAgenda)) {
  654.             // set the owning side to null (unless already changed)
  655.             if ($examAgenda->getYear() === $this) {
  656.                 $examAgenda->setYear(null);
  657.             }
  658.         }
  659.         return $this;
  660.     }
  661.     /**
  662.      * @return Collection<int, Quarter>
  663.      */
  664.     public function getQuarters(): Collection
  665.     {
  666.         return $this->quarters;
  667.     }
  668.     public function addQuarter(Quarter $quarter): static
  669.     {
  670.         if (!$this->quarters->contains($quarter)) {
  671.             $this->quarters->add($quarter);
  672.             $quarter->setYear($this);
  673.         }
  674.         return $this;
  675.     }
  676.     public function removeQuarter(Quarter $quarter): static
  677.     {
  678.         if ($this->quarters->removeElement($quarter)) {
  679.             // set the owning side to null (unless already changed)
  680.             if ($quarter->getYear() === $this) {
  681.                 $quarter->setYear(null);
  682.             }
  683.         }
  684.         return $this;
  685.     }
  686.     /**
  687.      * @return Collection<int, GlobalQuarter>
  688.      */
  689.     public function getGlobalQuarters(): Collection
  690.     {
  691.         return $this->globalQuarters;
  692.     }
  693.     public function addGlobalQuarter(GlobalQuarter $globalQuarter): static
  694.     {
  695.         if (!$this->globalQuarters->contains($globalQuarter)) {
  696.             $this->globalQuarters->add($globalQuarter);
  697.             $globalQuarter->setYear($this);
  698.         }
  699.         return $this;
  700.     }
  701.     public function removeGlobalQuarter(GlobalQuarter $globalQuarter): static
  702.     {
  703.         if ($this->globalQuarters->removeElement($globalQuarter)) {
  704.             // set the owning side to null (unless already changed)
  705.             if ($globalQuarter->getYear() === $this) {
  706.                 $globalQuarter->setYear(null);
  707.             }
  708.         }
  709.         return $this;
  710.     }
  711.     /**
  712.      * @return Collection<int, LocalAccount>
  713.      */
  714.     public function getLocalAccounts(): Collection
  715.     {
  716.         return $this->localAccounts;
  717.     }
  718.     public function addLocalAccount(LocalAccount $localAccount): static
  719.     {
  720.         if (!$this->localAccounts->contains($localAccount)) {
  721.             $this->localAccounts->add($localAccount);
  722.             $localAccount->setYear($this);
  723.         }
  724.         return $this;
  725.     }
  726.     public function removeLocalAccount(LocalAccount $localAccount): static
  727.     {
  728.         if ($this->localAccounts->removeElement($localAccount)) {
  729.             // set the owning side to null (unless already changed)
  730.             if ($localAccount->getYear() === $this) {
  731.                 $localAccount->setYear(null);
  732.             }
  733.         }
  734.         return $this;
  735.     }
  736.     /**
  737.      * @return Collection<int, Appreciation>
  738.      */
  739.     public function getAppreciations(): Collection
  740.     {
  741.         return $this->appreciations;
  742.     }
  743.     public function addAppreciation(Appreciation $appreciation): static
  744.     {
  745.         if (!$this->appreciations->contains($appreciation)) {
  746.             $this->appreciations->add($appreciation);
  747.             $appreciation->setYear($this);
  748.         }
  749.         return $this;
  750.     }
  751.     public function removeAppreciation(Appreciation $appreciation): static
  752.     {
  753.         if ($this->appreciations->removeElement($appreciation)) {
  754.             // set the owning side to null (unless already changed)
  755.             if ($appreciation->getYear() === $this) {
  756.                 $appreciation->setYear(null);
  757.             }
  758.         }
  759.         return $this;
  760.     }
  761.     /**
  762.      * @return Collection<int, DisciplineWarning>
  763.      */
  764.     public function getDisciplineWarnings(): Collection
  765.     {
  766.         return $this->disciplineWarnings;
  767.     }
  768.     public function addDisciplineWarning(DisciplineWarning $disciplineWarning): static
  769.     {
  770.         if (!$this->disciplineWarnings->contains($disciplineWarning)) {
  771.             $this->disciplineWarnings->add($disciplineWarning);
  772.             $disciplineWarning->setYear($this);
  773.         }
  774.         return $this;
  775.     }
  776.     public function removeDisciplineWarning(DisciplineWarning $disciplineWarning): static
  777.     {
  778.         if ($this->disciplineWarnings->removeElement($disciplineWarning)) {
  779.             // set the owning side to null (unless already changed)
  780.             if ($disciplineWarning->getYear() === $this) {
  781.                 $disciplineWarning->setYear(null);
  782.             }
  783.         }
  784.         return $this;
  785.     }
  786.     /**
  787.      * @return Collection<int, DisciplineBlame>
  788.      */
  789.     public function getDisciplineBlames(): Collection
  790.     {
  791.         return $this->disciplineBlames;
  792.     }
  793.     public function addDisciplineBlame(DisciplineBlame $disciplineBlame): static
  794.     {
  795.         if (!$this->disciplineBlames->contains($disciplineBlame)) {
  796.             $this->disciplineBlames->add($disciplineBlame);
  797.             $disciplineBlame->setYear($this);
  798.         }
  799.         return $this;
  800.     }
  801.     public function removeDisciplineBlame(DisciplineBlame $disciplineBlame): static
  802.     {
  803.         if ($this->disciplineBlames->removeElement($disciplineBlame)) {
  804.             // set the owning side to null (unless already changed)
  805.             if ($disciplineBlame->getYear() === $this) {
  806.                 $disciplineBlame->setYear(null);
  807.             }
  808.         }
  809.         return $this;
  810.     }
  811.     /**
  812.      * @return Collection<int, DisciplineExclusion>
  813.      */
  814.     public function getDisciplineExclusions(): Collection
  815.     {
  816.         return $this->disciplineExclusions;
  817.     }
  818.     public function addDisciplineExclusion(DisciplineExclusion $disciplineExclusion): static
  819.     {
  820.         if (!$this->disciplineExclusions->contains($disciplineExclusion)) {
  821.             $this->disciplineExclusions->add($disciplineExclusion);
  822.             $disciplineExclusion->setYear($this);
  823.         }
  824.         return $this;
  825.     }
  826.     public function removeDisciplineExclusion(DisciplineExclusion $disciplineExclusion): static
  827.     {
  828.         if ($this->disciplineExclusions->removeElement($disciplineExclusion)) {
  829.             // set the owning side to null (unless already changed)
  830.             if ($disciplineExclusion->getYear() === $this) {
  831.                 $disciplineExclusion->setYear(null);
  832.             }
  833.         }
  834.         return $this;
  835.     }
  836.     /**
  837.      * @return Collection<int, ParentNote>
  838.      */
  839.     public function getParentNotes(): Collection
  840.     {
  841.         return $this->parentNotes;
  842.     }
  843.     public function addParentNote(ParentNote $parentNote): static
  844.     {
  845.         if (!$this->parentNotes->contains($parentNote)) {
  846.             $this->parentNotes->add($parentNote);
  847.             $parentNote->setYear($this);
  848.         }
  849.         return $this;
  850.     }
  851.     public function removeParentNote(ParentNote $parentNote): static
  852.     {
  853.         if ($this->parentNotes->removeElement($parentNote)) {
  854.             // set the owning side to null (unless already changed)
  855.             if ($parentNote->getYear() === $this) {
  856.                 $parentNote->setYear(null);
  857.             }
  858.         }
  859.         return $this;
  860.     }
  861.     /**
  862.      * @return Collection<int, JustifyAbsence>
  863.      */
  864.     public function getJustifyAbsences(): Collection
  865.     {
  866.         return $this->justifyAbsences;
  867.     }
  868.     public function addJustifyAbsence(JustifyAbsence $justifyAbsence): static
  869.     {
  870.         if (!$this->justifyAbsences->contains($justifyAbsence)) {
  871.             $this->justifyAbsences->add($justifyAbsence);
  872.             $justifyAbsence->setYear($this);
  873.         }
  874.         return $this;
  875.     }
  876.     public function removeJustifyAbsence(JustifyAbsence $justifyAbsence): static
  877.     {
  878.         if ($this->justifyAbsences->removeElement($justifyAbsence)) {
  879.             // set the owning side to null (unless already changed)
  880.             if ($justifyAbsence->getYear() === $this) {
  881.                 $justifyAbsence->setYear(null);
  882.             }
  883.         }
  884.         return $this;
  885.     }
  886.     /**
  887.      * @return Collection<int, Subject>
  888.      */
  889.     public function getSubjects(): Collection
  890.     {
  891.         return $this->subjects;
  892.     }
  893.     public function addSubject(Subject $subject): static
  894.     {
  895.         if (!$this->subjects->contains($subject)) {
  896.             $this->subjects->add($subject);
  897.             $subject->setYear($this);
  898.         }
  899.         return $this;
  900.     }
  901.     public function removeSubject(Subject $subject): static
  902.     {
  903.         if ($this->subjects->removeElement($subject)) {
  904.             // set the owning side to null (unless already changed)
  905.             if ($subject->getYear() === $this) {
  906.                 $subject->setYear(null);
  907.             }
  908.         }
  909.         return $this;
  910.     }
  911.     /**
  912.      * @return Collection<int, SubjectReference>
  913.      */
  914.     public function getSubjectReferences(): Collection
  915.     {
  916.         return $this->subjectReferences;
  917.     }
  918.     public function addSubjectReference(SubjectReference $subjectReference): static
  919.     {
  920.         if (!$this->subjectReferences->contains($subjectReference)) {
  921.             $this->subjectReferences->add($subjectReference);
  922.             $subjectReference->setYear($this);
  923.         }
  924.         return $this;
  925.     }
  926.     public function removeSubjectReference(SubjectReference $subjectReference): static
  927.     {
  928.         if ($this->subjectReferences->removeElement($subjectReference)) {
  929.             if ($subjectReference->getYear() === $this) {
  930.                 $subjectReference->setYear(null);
  931.             }
  932.         }
  933.         return $this;
  934.     }
  935.     /**
  936.      * @return Collection<int, AbsenceRetainedConfig>
  937.      */
  938.     public function getAbsenceRetainedConfigs(): Collection
  939.     {
  940.         return $this->absenceRetainedConfigs;
  941.     }
  942.     public function addAbsenceRetainedConfig(AbsenceRetainedConfig $absenceRetainedConfig): static
  943.     {
  944.         if (!$this->absenceRetainedConfigs->contains($absenceRetainedConfig)) {
  945.             $this->absenceRetainedConfigs->add($absenceRetainedConfig);
  946.             $absenceRetainedConfig->setYear($this);
  947.         }
  948.         return $this;
  949.     }
  950.     public function removeAbsenceRetainedConfig(AbsenceRetainedConfig $absenceRetainedConfig): static
  951.     {
  952.         if ($this->absenceRetainedConfigs->removeElement($absenceRetainedConfig)) {
  953.             // set the owning side to null (unless already changed)
  954.             if ($absenceRetainedConfig->getYear() === $this) {
  955.                 $absenceRetainedConfig->setYear(null);
  956.             }
  957.         }
  958.         return $this;
  959.     }
  960.     /**
  961.      * @return Collection<int, AbsenceWarningConfig>
  962.      */
  963.     public function getAbsenceWarningConfigs(): Collection
  964.     {
  965.         return $this->absenceWarningConfigs;
  966.     }
  967.     public function addAbsenceWarningConfig(AbsenceWarningConfig $absenceWarningConfig): static
  968.     {
  969.         if (!$this->absenceWarningConfigs->contains($absenceWarningConfig)) {
  970.             $this->absenceWarningConfigs->add($absenceWarningConfig);
  971.             $absenceWarningConfig->setYear($this);
  972.         }
  973.         return $this;
  974.     }
  975.     public function removeAbsenceWarningConfig(AbsenceWarningConfig $absenceWarningConfig): static
  976.     {
  977.         if ($this->absenceWarningConfigs->removeElement($absenceWarningConfig)) {
  978.             // set the owning side to null (unless already changed)
  979.             if ($absenceWarningConfig->getYear() === $this) {
  980.                 $absenceWarningConfig->setYear(null);
  981.             }
  982.         }
  983.         return $this;
  984.     }
  985.     /**
  986.      * @return Collection<int, AbsenceExclusionConfig>
  987.      */
  988.     public function getAbsenceExclusionConfigs(): Collection
  989.     {
  990.         return $this->absenceExclusionConfigs;
  991.     }
  992.     public function addAbsenceExclusionConfig(AbsenceExclusionConfig $absenceExclusionConfig): static
  993.     {
  994.         if (!$this->absenceExclusionConfigs->contains($absenceExclusionConfig)) {
  995.             $this->absenceExclusionConfigs->add($absenceExclusionConfig);
  996.             $absenceExclusionConfig->setYear($this);
  997.         }
  998.         return $this;
  999.     }
  1000.     public function removeAbsenceExclusionConfig(AbsenceExclusionConfig $absenceExclusionConfig): static
  1001.     {
  1002.         if ($this->absenceExclusionConfigs->removeElement($absenceExclusionConfig)) {
  1003.             // set the owning side to null (unless already changed)
  1004.             if ($absenceExclusionConfig->getYear() === $this) {
  1005.                 $absenceExclusionConfig->setYear(null);
  1006.             }
  1007.         }
  1008.         return $this;
  1009.     }
  1010.     /**
  1011.      * @return Collection<int, AbsenceBlameConfig>
  1012.      */
  1013.     public function getAbsenceBlameConfigs(): Collection
  1014.     {
  1015.         return $this->absenceBlameConfigs;
  1016.     }
  1017.     public function addAbsenceBlameConfig(AbsenceBlameConfig $absenceBlameConfig): static
  1018.     {
  1019.         if (!$this->absenceBlameConfigs->contains($absenceBlameConfig)) {
  1020.             $this->absenceBlameConfigs->add($absenceBlameConfig);
  1021.             $absenceBlameConfig->setYear($this);
  1022.         }
  1023.         return $this;
  1024.     }
  1025.     public function removeAbsenceBlameConfig(AbsenceBlameConfig $absenceBlameConfig): static
  1026.     {
  1027.         if ($this->absenceBlameConfigs->removeElement($absenceBlameConfig)) {
  1028.             // set the owning side to null (unless already changed)
  1029.             if ($absenceBlameConfig->getYear() === $this) {
  1030.                 $absenceBlameConfig->setYear(null);
  1031.             }
  1032.         }
  1033.         return $this;
  1034.     }
  1035.     /**
  1036.      * @return Collection<int, DisciplineRetained>
  1037.      */
  1038.     public function getDisciplineRetaineds(): Collection
  1039.     {
  1040.         return $this->disciplineRetaineds;
  1041.     }
  1042.     public function addDisciplineRetained(DisciplineRetained $disciplineRetained): static
  1043.     {
  1044.         if (!$this->disciplineRetaineds->contains($disciplineRetained)) {
  1045.             $this->disciplineRetaineds->add($disciplineRetained);
  1046.             $disciplineRetained->setYear($this);
  1047.         }
  1048.         return $this;
  1049.     }
  1050.     public function removeDisciplineRetained(DisciplineRetained $disciplineRetained): static
  1051.     {
  1052.         if ($this->disciplineRetaineds->removeElement($disciplineRetained)) {
  1053.             // set the owning side to null (unless already changed)
  1054.             if ($disciplineRetained->getYear() === $this) {
  1055.                 $disciplineRetained->setYear(null);
  1056.             }
  1057.         }
  1058.         return $this;
  1059.     }
  1060.     /**
  1061.      * @return Collection<int, DefinitiveExclusion>
  1062.      */
  1063.     public function getDefinitiveExclusions(): Collection
  1064.     {
  1065.         return $this->definitiveExclusions;
  1066.     }
  1067.     public function addDefinitiveExclusion(DefinitiveExclusion $definitiveExclusion): static
  1068.     {
  1069.         if (!$this->definitiveExclusions->contains($definitiveExclusion)) {
  1070.             $this->definitiveExclusions->add($definitiveExclusion);
  1071.             $definitiveExclusion->setYear($this);
  1072.         }
  1073.         return $this;
  1074.     }
  1075.     public function removeDefinitiveExclusion(DefinitiveExclusion $definitiveExclusion): static
  1076.     {
  1077.         if ($this->definitiveExclusions->removeElement($definitiveExclusion)) {
  1078.             // set the owning side to null (unless already changed)
  1079.             if ($definitiveExclusion->getYear() === $this) {
  1080.                 $definitiveExclusion->setYear(null);
  1081.             }
  1082.         }
  1083.         return $this;
  1084.     }
  1085.     /**
  1086.      * @return Collection<int, DisciplineConcile>
  1087.      */
  1088.     public function getDisciplineConciles(): Collection
  1089.     {
  1090.         return $this->disciplineConciles;
  1091.     }
  1092.     public function addDisciplineConcile(DisciplineConcile $disciplineConcile): static
  1093.     {
  1094.         if (!$this->disciplineConciles->contains($disciplineConcile)) {
  1095.             $this->disciplineConciles->add($disciplineConcile);
  1096.             $disciplineConcile->setYear($this);
  1097.         }
  1098.         return $this;
  1099.     }
  1100.     public function removeDisciplineConcile(DisciplineConcile $disciplineConcile): static
  1101.     {
  1102.         if ($this->disciplineConciles->removeElement($disciplineConcile)) {
  1103.             // set the owning side to null (unless already changed)
  1104.             if ($disciplineConcile->getYear() === $this) {
  1105.                 $disciplineConcile->setYear(null);
  1106.             }
  1107.         }
  1108.         return $this;
  1109.     }
  1110.     /**
  1111.      * @return Collection<int, AbsenceDisciplineConcileConfig>
  1112.      */
  1113.     public function getAbsenceDisciplineConcileConfigs(): Collection
  1114.     {
  1115.         return $this->absenceDisciplineConcileConfigs;
  1116.     }
  1117.     public function addAbsenceDisciplineConcileConfig(AbsenceDisciplineConcileConfig $absenceDisciplineConcileConfig): static
  1118.     {
  1119.         if (!$this->absenceDisciplineConcileConfigs->contains($absenceDisciplineConcileConfig)) {
  1120.             $this->absenceDisciplineConcileConfigs->add($absenceDisciplineConcileConfig);
  1121.             $absenceDisciplineConcileConfig->setYear($this);
  1122.         }
  1123.         return $this;
  1124.     }
  1125.     public function removeAbsenceDisciplineConcileConfig(AbsenceDisciplineConcileConfig $absenceDisciplineConcileConfig): static
  1126.     {
  1127.         if ($this->absenceDisciplineConcileConfigs->removeElement($absenceDisciplineConcileConfig)) {
  1128.             // set the owning side to null (unless already changed)
  1129.             if ($absenceDisciplineConcileConfig->getYear() === $this) {
  1130.                 $absenceDisciplineConcileConfig->setYear(null);
  1131.             }
  1132.         }
  1133.         return $this;
  1134.     }
  1135.     /**
  1136.      * @return Collection<int, WarningBlameConfig>
  1137.      */
  1138.     public function getWarningBlameConfigs(): Collection
  1139.     {
  1140.         return $this->warningBlameConfigs;
  1141.     }
  1142.     public function addWarningBlameConfig(WarningBlameConfig $warningBlameConfig): static
  1143.     {
  1144.         if (!$this->warningBlameConfigs->contains($warningBlameConfig)) {
  1145.             $this->warningBlameConfigs->add($warningBlameConfig);
  1146.             $warningBlameConfig->setYear($this);
  1147.         }
  1148.         return $this;
  1149.     }
  1150.     public function removeWarningBlameConfig(WarningBlameConfig $warningBlameConfig): static
  1151.     {
  1152.         if ($this->warningBlameConfigs->removeElement($warningBlameConfig)) {
  1153.             // set the owning side to null (unless already changed)
  1154.             if ($warningBlameConfig->getYear() === $this) {
  1155.                 $warningBlameConfig->setYear(null);
  1156.             }
  1157.         }
  1158.         return $this;
  1159.     }
  1160.     /**
  1161.      * @return Collection<int, WarningDefinitiveExlusionConfig>
  1162.      */
  1163.     public function getWarningDefinitiveExlusionConfigs(): Collection
  1164.     {
  1165.         return $this->warningDefinitiveExlusionConfigs;
  1166.     }
  1167.     public function addWarningDefinitiveExlusionConfig(WarningDefinitiveExlusionConfig $warningDefinitiveExlusionConfig): static
  1168.     {
  1169.         if (!$this->warningDefinitiveExlusionConfigs->contains($warningDefinitiveExlusionConfig)) {
  1170.             $this->warningDefinitiveExlusionConfigs->add($warningDefinitiveExlusionConfig);
  1171.             $warningDefinitiveExlusionConfig->setYear($this);
  1172.         }
  1173.         return $this;
  1174.     }
  1175.     public function removeWarningDefinitiveExlusionConfig(WarningDefinitiveExlusionConfig $warningDefinitiveExlusionConfig): static
  1176.     {
  1177.         if ($this->warningDefinitiveExlusionConfigs->removeElement($warningDefinitiveExlusionConfig)) {
  1178.             // set the owning side to null (unless already changed)
  1179.             if ($warningDefinitiveExlusionConfig->getYear() === $this) {
  1180.                 $warningDefinitiveExlusionConfig->setYear(null);
  1181.             }
  1182.         }
  1183.         return $this;
  1184.     }
  1185.     /**
  1186.      * @return Collection<int, PrimaryParentNote>
  1187.      */
  1188.     public function getPrimaryParentNotes(): Collection
  1189.     {
  1190.         return $this->primaryParentNotes;
  1191.     }
  1192.     public function addPrimaryParentNote(PrimaryParentNote $primaryParentNote): static
  1193.     {
  1194.         if (!$this->primaryParentNotes->contains($primaryParentNote)) {
  1195.             $this->primaryParentNotes->add($primaryParentNote);
  1196.             $primaryParentNote->setYear($this);
  1197.         }
  1198.         return $this;
  1199.     }
  1200.     public function removePrimaryParentNote(PrimaryParentNote $primaryParentNote): static
  1201.     {
  1202.         if ($this->primaryParentNotes->removeElement($primaryParentNote)) {
  1203.             // set the owning side to null (unless already changed)
  1204.             if ($primaryParentNote->getYear() === $this) {
  1205.                 $primaryParentNote->setYear(null);
  1206.             }
  1207.         }
  1208.         return $this;
  1209.     }
  1210.     /**
  1211.      * @return Collection<int, PrimaryNote>
  1212.      */
  1213.     public function getPrimaryNotes(): Collection
  1214.     {
  1215.         return $this->primaryNotes;
  1216.     }
  1217.     public function addPrimaryNote(PrimaryNote $primaryNote): static
  1218.     {
  1219.         if (!$this->primaryNotes->contains($primaryNote)) {
  1220.             $this->primaryNotes->add($primaryNote);
  1221.             $primaryNote->setYear($this);
  1222.         }
  1223.         return $this;
  1224.     }
  1225.     public function removePrimaryNote(PrimaryNote $primaryNote): static
  1226.     {
  1227.         if ($this->primaryNotes->removeElement($primaryNote)) {
  1228.             // set the owning side to null (unless already changed)
  1229.             if ($primaryNote->getYear() === $this) {
  1230.                 $primaryNote->setYear(null);
  1231.             }
  1232.         }
  1233.         return $this;
  1234.     }
  1235.     /**
  1236.      * @return Collection<int, VerbalProcessCategory>
  1237.      */
  1238.     public function getVerbalProcessCategories(): Collection
  1239.     {
  1240.         return $this->verbalProcessCategories;
  1241.     }
  1242.     public function addVerbalProcessCategory(VerbalProcessCategory $verbalProcessCategory): static
  1243.     {
  1244.         if (!$this->verbalProcessCategories->contains($verbalProcessCategory)) {
  1245.             $this->verbalProcessCategories->add($verbalProcessCategory);
  1246.             $verbalProcessCategory->setYear($this);
  1247.         }
  1248.         return $this;
  1249.     }
  1250.     public function removeVerbalProcessCategory(VerbalProcessCategory $verbalProcessCategory): static
  1251.     {
  1252.         if ($this->verbalProcessCategories->removeElement($verbalProcessCategory)) {
  1253.             // set the owning side to null (unless already changed)
  1254.             if ($verbalProcessCategory->getYear() === $this) {
  1255.                 $verbalProcessCategory->setYear(null);
  1256.             }
  1257.         }
  1258.         return $this;
  1259.     }
  1260.     /**
  1261.      * @return Collection<int, GlobalDisciplineConfig>
  1262.      */
  1263.     public function getGlobalDisciplineConfigs(): Collection
  1264.     {
  1265.         return $this->globalDisciplineConfigs;
  1266.     }
  1267.     public function addGlobalDisciplineConfig(GlobalDisciplineConfig $globalDisciplineConfig): static
  1268.     {
  1269.         if (!$this->globalDisciplineConfigs->contains($globalDisciplineConfig)) {
  1270.             $this->globalDisciplineConfigs->add($globalDisciplineConfig);
  1271.             $globalDisciplineConfig->setYear($this);
  1272.         }
  1273.         return $this;
  1274.     }
  1275.     public function removeGlobalDisciplineConfig(GlobalDisciplineConfig $globalDisciplineConfig): static
  1276.     {
  1277.         if ($this->globalDisciplineConfigs->removeElement($globalDisciplineConfig)) {
  1278.             // set the owning side to null (unless already changed)
  1279.             if ($globalDisciplineConfig->getYear() === $this) {
  1280.                 $globalDisciplineConfig->setYear(null);
  1281.             }
  1282.         }
  1283.         return $this;
  1284.     }
  1285.     /**
  1286.      * @return Collection<int, DisciplinePunish>
  1287.      */
  1288.     public function getDisciplinePunishes(): Collection
  1289.     {
  1290.         return $this->disciplinePunishes;
  1291.     }
  1292.     public function addDisciplinePunish(DisciplinePunish $disciplinePunish): static
  1293.     {
  1294.         if (!$this->disciplinePunishes->contains($disciplinePunish)) {
  1295.             $this->disciplinePunishes->add($disciplinePunish);
  1296.             $disciplinePunish->setYear($this);
  1297.         }
  1298.         return $this;
  1299.     }
  1300.     public function removeDisciplinePunish(DisciplinePunish $disciplinePunish): static
  1301.     {
  1302.         if ($this->disciplinePunishes->removeElement($disciplinePunish)) {
  1303.             // set the owning side to null (unless already changed)
  1304.             if ($disciplinePunish->getYear() === $this) {
  1305.                 $disciplinePunish->setYear(null);
  1306.             }
  1307.         }
  1308.         return $this;
  1309.     }
  1310.     /**
  1311.      * @return Collection<int, GlobalDisciplineEnabledConfig>
  1312.      */
  1313.     public function getGlobalDisciplineEnabledConfigs(): Collection
  1314.     {
  1315.         return $this->globalDisciplineEnabledConfigs;
  1316.     }
  1317.     public function addGlobalDisciplineEnabledConfig(GlobalDisciplineEnabledConfig $globalDisciplineEnabledConfig): static
  1318.     {
  1319.         if (!$this->globalDisciplineEnabledConfigs->contains($globalDisciplineEnabledConfig)) {
  1320.             $this->globalDisciplineEnabledConfigs->add($globalDisciplineEnabledConfig);
  1321.             $globalDisciplineEnabledConfig->setYear($this);
  1322.         }
  1323.         return $this;
  1324.     }
  1325.     public function removeGlobalDisciplineEnabledConfig(GlobalDisciplineEnabledConfig $globalDisciplineEnabledConfig): static
  1326.     {
  1327.         if ($this->globalDisciplineEnabledConfigs->removeElement($globalDisciplineEnabledConfig)) {
  1328.             // set the owning side to null (unless already changed)
  1329.             if ($globalDisciplineEnabledConfig->getYear() === $this) {
  1330.                 $globalDisciplineEnabledConfig->setYear(null);
  1331.             }
  1332.         }
  1333.         return $this;
  1334.     }
  1335.     /**
  1336.      * @return Collection<int, BlamePunishConfig>
  1337.      */
  1338.     public function getBlamePunishConfigs(): Collection
  1339.     {
  1340.         return $this->blamePunishConfigs;
  1341.     }
  1342.     public function addBlamePunishConfig(BlamePunishConfig $blamePunishConfig): static
  1343.     {
  1344.         if (!$this->blamePunishConfigs->contains($blamePunishConfig)) {
  1345.             $this->blamePunishConfigs->add($blamePunishConfig);
  1346.             $blamePunishConfig->setYear($this);
  1347.         }
  1348.         return $this;
  1349.     }
  1350.     public function removeBlamePunishConfig(BlamePunishConfig $blamePunishConfig): static
  1351.     {
  1352.         if ($this->blamePunishConfigs->removeElement($blamePunishConfig)) {
  1353.             // set the owning side to null (unless already changed)
  1354.             if ($blamePunishConfig->getYear() === $this) {
  1355.                 $blamePunishConfig->setYear(null);
  1356.             }
  1357.         }
  1358.         return $this;
  1359.     }
  1360.     /**
  1361.      * @return Collection<int, AbsencePunishConfig>
  1362.      */
  1363.     public function getAbsencePunishConfigs(): Collection
  1364.     {
  1365.         return $this->absencePunishConfigs;
  1366.     }
  1367.     public function addAbsencePunishConfig(AbsencePunishConfig $absencePunishConfig): static
  1368.     {
  1369.         if (!$this->absencePunishConfigs->contains($absencePunishConfig)) {
  1370.             $this->absencePunishConfigs->add($absencePunishConfig);
  1371.             $absencePunishConfig->setYear($this);
  1372.         }
  1373.         return $this;
  1374.     }
  1375.     public function removeAbsencePunishConfig(AbsencePunishConfig $absencePunishConfig): static
  1376.     {
  1377.         if ($this->absencePunishConfigs->removeElement($absencePunishConfig)) {
  1378.             // set the owning side to null (unless already changed)
  1379.             if ($absencePunishConfig->getYear() === $this) {
  1380.                 $absencePunishConfig->setYear(null);
  1381.             }
  1382.         }
  1383.         return $this;
  1384.     }
  1385.     /**
  1386.      * @return Collection<int, WarningPunishConfig>
  1387.      */
  1388.     public function getWarningPunishConfigs(): Collection
  1389.     {
  1390.         return $this->warningPunishConfigs;
  1391.     }
  1392.     public function addWarningPunishConfig(WarningPunishConfig $warningPunishConfig): static
  1393.     {
  1394.         if (!$this->warningPunishConfigs->contains($warningPunishConfig)) {
  1395.             $this->warningPunishConfigs->add($warningPunishConfig);
  1396.             $warningPunishConfig->setYear($this);
  1397.         }
  1398.         return $this;
  1399.     }
  1400.     public function removeWarningPunishConfig(WarningPunishConfig $warningPunishConfig): static
  1401.     {
  1402.         if ($this->warningPunishConfigs->removeElement($warningPunishConfig)) {
  1403.             // set the owning side to null (unless already changed)
  1404.             if ($warningPunishConfig->getYear() === $this) {
  1405.                 $warningPunishConfig->setYear(null);
  1406.             }
  1407.         }
  1408.         return $this;
  1409.     }
  1410.     /**
  1411.      * @return Collection<int, PunishRetainedConfig>
  1412.      */
  1413.     public function getPunishRetainedConfigs(): Collection
  1414.     {
  1415.         return $this->punishRetainedConfigs;
  1416.     }
  1417.     public function addPunishRetainedConfig(PunishRetainedConfig $punishRetainedConfig): static
  1418.     {
  1419.         if (!$this->punishRetainedConfigs->contains($punishRetainedConfig)) {
  1420.             $this->punishRetainedConfigs->add($punishRetainedConfig);
  1421.             $punishRetainedConfig->setYear($this);
  1422.         }
  1423.         return $this;
  1424.     }
  1425.     public function removePunishRetainedConfig(PunishRetainedConfig $punishRetainedConfig): static
  1426.     {
  1427.         if ($this->punishRetainedConfigs->removeElement($punishRetainedConfig)) {
  1428.             // set the owning side to null (unless already changed)
  1429.             if ($punishRetainedConfig->getYear() === $this) {
  1430.                 $punishRetainedConfig->setYear(null);
  1431.             }
  1432.         }
  1433.         return $this;
  1434.     }
  1435.     /**
  1436.      * @return Collection<int, PunishWarningConfig>
  1437.      */
  1438.     public function getPunishWarningConfigs(): Collection
  1439.     {
  1440.         return $this->punishWarningConfigs;
  1441.     }
  1442.     public function addPunishWarningConfig(PunishWarningConfig $punishWarningConfig): static
  1443.     {
  1444.         if (!$this->punishWarningConfigs->contains($punishWarningConfig)) {
  1445.             $this->punishWarningConfigs->add($punishWarningConfig);
  1446.             $punishWarningConfig->setYear($this);
  1447.         }
  1448.         return $this;
  1449.     }
  1450.     public function removePunishWarningConfig(PunishWarningConfig $punishWarningConfig): static
  1451.     {
  1452.         if ($this->punishWarningConfigs->removeElement($punishWarningConfig)) {
  1453.             // set the owning side to null (unless already changed)
  1454.             if ($punishWarningConfig->getYear() === $this) {
  1455.                 $punishWarningConfig->setYear(null);
  1456.             }
  1457.         }
  1458.         return $this;
  1459.     }
  1460.     /**
  1461.      * @return Collection<int, PunishBlameConfig>
  1462.      */
  1463.     public function getPunishBlameConfigs(): Collection
  1464.     {
  1465.         return $this->punishBlameConfigs;
  1466.     }
  1467.     public function addPunishBlameConfig(PunishBlameConfig $punishBlameConfig): static
  1468.     {
  1469.         if (!$this->punishBlameConfigs->contains($punishBlameConfig)) {
  1470.             $this->punishBlameConfigs->add($punishBlameConfig);
  1471.             $punishBlameConfig->setYear($this);
  1472.         }
  1473.         return $this;
  1474.     }
  1475.     public function removePunishBlameConfig(PunishBlameConfig $punishBlameConfig): static
  1476.     {
  1477.         if ($this->punishBlameConfigs->removeElement($punishBlameConfig)) {
  1478.             // set the owning side to null (unless already changed)
  1479.             if ($punishBlameConfig->getYear() === $this) {
  1480.                 $punishBlameConfig->setYear(null);
  1481.             }
  1482.         }
  1483.         return $this;
  1484.     }
  1485.     /**
  1486.      * @return Collection<int, PunishExclusionConfig>
  1487.      */
  1488.     public function getPunishExclusionConfigs(): Collection
  1489.     {
  1490.         return $this->punishExclusionConfigs;
  1491.     }
  1492.     public function addPunishExclusionConfig(PunishExclusionConfig $punishExclusionConfig): static
  1493.     {
  1494.         if (!$this->punishExclusionConfigs->contains($punishExclusionConfig)) {
  1495.             $this->punishExclusionConfigs->add($punishExclusionConfig);
  1496.             $punishExclusionConfig->setYear($this);
  1497.         }
  1498.         return $this;
  1499.     }
  1500.     public function removePunishExclusionConfig(PunishExclusionConfig $punishExclusionConfig): static
  1501.     {
  1502.         if ($this->punishExclusionConfigs->removeElement($punishExclusionConfig)) {
  1503.             // set the owning side to null (unless already changed)
  1504.             if ($punishExclusionConfig->getYear() === $this) {
  1505.                 $punishExclusionConfig->setYear(null);
  1506.             }
  1507.         }
  1508.         return $this;
  1509.     }
  1510.     public function getNameEn(): ?string
  1511.     {
  1512.         return $this->nameEn;
  1513.     }
  1514.     public function setNameEn(string $nameEn): static
  1515.     {
  1516.         $this->nameEn $nameEn;
  1517.         return $this;
  1518.     }
  1519.     /**
  1520.      * @return Collection<int, SchoolYearInfos>
  1521.      */
  1522.     public function getSchoolYearInfos(): Collection
  1523.     {
  1524.         return $this->schoolYearInfos;
  1525.     }
  1526.     public function addSchoolYearInfo(SchoolYearInfos $schoolYearInfo): static
  1527.     {
  1528.         if (!$this->schoolYearInfos->contains($schoolYearInfo)) {
  1529.             $this->schoolYearInfos->add($schoolYearInfo);
  1530.             $schoolYearInfo->setYear($this);
  1531.         }
  1532.         return $this;
  1533.     }
  1534.     public function removeSchoolYearInfo(SchoolYearInfos $schoolYearInfo): static
  1535.     {
  1536.         if ($this->schoolYearInfos->removeElement($schoolYearInfo)) {
  1537.             // set the owning side to null (unless already changed)
  1538.             if ($schoolYearInfo->getYear() === $this) {
  1539.                 $schoolYearInfo->setYear(null);
  1540.             }
  1541.         }
  1542.         return $this;
  1543.     }
  1544.     /**
  1545.      * @return Collection<int, Blame>
  1546.      */
  1547.     public function getBlames(): Collection
  1548.     {
  1549.         return $this->blames;
  1550.     }
  1551.     public function addBlame(Blame $blame): static
  1552.     {
  1553.         if (!$this->blames->contains($blame)) {
  1554.             $this->blames->add($blame);
  1555.             $blame->setYear($this);
  1556.         }
  1557.         return $this;
  1558.     }
  1559.     public function removeBlame(Blame $blame): static
  1560.     {
  1561.         if ($this->blames->removeElement($blame)) {
  1562.             // set the owning side to null (unless already changed)
  1563.             if ($blame->getYear() === $this) {
  1564.                 $blame->setYear(null);
  1565.             }
  1566.         }
  1567.         return $this;
  1568.     }
  1569.     /**
  1570.      * @return Collection<int, Warning>
  1571.      */
  1572.     public function getWarnings(): Collection
  1573.     {
  1574.         return $this->warnings;
  1575.     }
  1576.     public function addWarning(Warning $warning): static
  1577.     {
  1578.         if (!$this->warnings->contains($warning)) {
  1579.             $this->warnings->add($warning);
  1580.             $warning->setYear($this);
  1581.         }
  1582.         return $this;
  1583.     }
  1584.     public function removeWarning(Warning $warning): static
  1585.     {
  1586.         if ($this->warnings->removeElement($warning)) {
  1587.             // set the owning side to null (unless already changed)
  1588.             if ($warning->getYear() === $this) {
  1589.                 $warning->setYear(null);
  1590.             }
  1591.         }
  1592.         return $this;
  1593.     }
  1594.     /**
  1595.      * @return Collection<int, Retained>
  1596.      */
  1597.     public function getRetaineds(): Collection
  1598.     {
  1599.         return $this->retaineds;
  1600.     }
  1601.     public function addRetained(Retained $retained): static
  1602.     {
  1603.         if (!$this->retaineds->contains($retained)) {
  1604.             $this->retaineds->add($retained);
  1605.             $retained->setYear($this);
  1606.         }
  1607.         return $this;
  1608.     }
  1609.     public function removeRetained(Retained $retained): static
  1610.     {
  1611.         if ($this->retaineds->removeElement($retained)) {
  1612.             // set the owning side to null (unless already changed)
  1613.             if ($retained->getYear() === $this) {
  1614.                 $retained->setYear(null);
  1615.             }
  1616.         }
  1617.         return $this;
  1618.     }
  1619.     /**
  1620.      * @return Collection<int, HonnorTableLimitMoy>
  1621.      */
  1622.     public function getHonnorTableLimitMoys(): Collection
  1623.     {
  1624.         return $this->honnorTableLimitMoys;
  1625.     }
  1626.     public function addHonnorTableLimitMoy(HonnorTableLimitMoy $honnorTableLimitMoy): static
  1627.     {
  1628.         if (!$this->honnorTableLimitMoys->contains($honnorTableLimitMoy)) {
  1629.             $this->honnorTableLimitMoys->add($honnorTableLimitMoy);
  1630.             $honnorTableLimitMoy->setYear($this);
  1631.         }
  1632.         return $this;
  1633.     }
  1634.     public function removeHonnorTableLimitMoy(HonnorTableLimitMoy $honnorTableLimitMoy): static
  1635.     {
  1636.         if ($this->honnorTableLimitMoys->removeElement($honnorTableLimitMoy)) {
  1637.             // set the owning side to null (unless already changed)
  1638.             if ($honnorTableLimitMoy->getYear() === $this) {
  1639.                 $honnorTableLimitMoy->setYear(null);
  1640.             }
  1641.         }
  1642.         return $this;
  1643.     }
  1644.     /**
  1645.      * @return Collection<int, News>
  1646.      */
  1647.     public function getNews(): Collection
  1648.     {
  1649.         return $this->news;
  1650.     }
  1651.     public function addNews(News $news): static
  1652.     {
  1653.         if (!$this->news->contains($news)) {
  1654.             $this->news->add($news);
  1655.             $news->setYear($this);
  1656.         }
  1657.         return $this;
  1658.     }
  1659.     public function removeNews(News $news): static
  1660.     {
  1661.         if ($this->news->removeElement($news)) {
  1662.             // set the owning side to null (unless already changed)
  1663.             if ($news->getYear() === $this) {
  1664.                 $news->setYear(null);
  1665.             }
  1666.         }
  1667.         return $this;
  1668.     }
  1669.     /**
  1670.      * @return Collection<int, Event>
  1671.      */
  1672.     public function getEvents(): Collection
  1673.     {
  1674.         return $this->events;
  1675.     }
  1676.     public function addEvent(Event $event): static
  1677.     {
  1678.         if (!$this->events->contains($event)) {
  1679.             $this->events->add($event);
  1680.             $event->setYear($this);
  1681.         }
  1682.         return $this;
  1683.     }
  1684.     public function removeEvent(Event $event): static
  1685.     {
  1686.         if ($this->events->removeElement($event)) {
  1687.             // set the owning side to null (unless already changed)
  1688.             if ($event->getYear() === $this) {
  1689.                 $event->setYear(null);
  1690.             }
  1691.         }
  1692.         return $this;
  1693.     }
  1694.     /**
  1695.      * @return Collection<int, AdmissionLimit>
  1696.      */
  1697.     public function getAdmissionLimits(): Collection
  1698.     {
  1699.         return $this->admissionLimits;
  1700.     }
  1701.     public function addAdmissionLimit(AdmissionLimit $admissionLimit): static
  1702.     {
  1703.         if (!$this->admissionLimits->contains($admissionLimit)) {
  1704.             $this->admissionLimits->add($admissionLimit);
  1705.             $admissionLimit->setYear($this);
  1706.         }
  1707.         return $this;
  1708.     }
  1709.     public function removeAdmissionLimit(AdmissionLimit $admissionLimit): static
  1710.     {
  1711.         if ($this->admissionLimits->removeElement($admissionLimit)) {
  1712.             // set the owning side to null (unless already changed)
  1713.             if ($admissionLimit->getYear() === $this) {
  1714.                 $admissionLimit->setYear(null);
  1715.             }
  1716.         }
  1717.         return $this;
  1718.     }
  1719.     public function getAgendaTimeConvertion(): ?AgendaTimeConvertion
  1720.     {
  1721.         return $this->agendaTimeConvertion;
  1722.     }
  1723.     public function setAgendaTimeConvertion(AgendaTimeConvertion $agendaTimeConvertion): static
  1724.     {
  1725.         // set the owning side of the relation if necessary
  1726.         if ($agendaTimeConvertion->getYear() !== $this) {
  1727.             $agendaTimeConvertion->setYear($this);
  1728.         }
  1729.         $this->agendaTimeConvertion $agendaTimeConvertion;
  1730.         return $this;
  1731.     }
  1732.     /**
  1733.      * @return Collection<int, ExamWeek>
  1734.      */
  1735.     public function getExamWeeks(): Collection
  1736.     {
  1737.         return $this->examWeeks;
  1738.     }
  1739.     public function addExamWeek(ExamWeek $examWeek): static
  1740.     {
  1741.         if (!$this->examWeeks->contains($examWeek)) {
  1742.             $this->examWeeks->add($examWeek);
  1743.             $examWeek->setYear($this);
  1744.         }
  1745.         return $this;
  1746.     }
  1747.     public function removeExamWeek(ExamWeek $examWeek): static
  1748.     {
  1749.         if ($this->examWeeks->removeElement($examWeek)) {
  1750.             // set the owning side to null (unless already changed)
  1751.             if ($examWeek->getYear() === $this) {
  1752.                 $examWeek->setYear(null);
  1753.             }
  1754.         }
  1755.         return $this;
  1756.     }
  1757.     /**
  1758.      * @return Collection<int, Competence>
  1759.      */
  1760.     public function getCompetences(): Collection
  1761.     {
  1762.         return $this->competences;
  1763.     }
  1764.     public function addCompetence(Competence $competence): static
  1765.     {
  1766.         if (!$this->competences->contains($competence)) {
  1767.             $this->competences->add($competence);
  1768.             $competence->setYear($this);
  1769.         }
  1770.         return $this;
  1771.     }
  1772.     public function removeCompetence(Competence $competence): static
  1773.     {
  1774.         if ($this->competences->removeElement($competence)) {
  1775.             // set the owning side to null (unless already changed)
  1776.             if ($competence->getYear() === $this) {
  1777.                 $competence->setYear(null);
  1778.             }
  1779.         }
  1780.         return $this;
  1781.     }
  1782.     /**
  1783.      * @return Collection<int, WeekSubjectGoal>
  1784.      */
  1785.     public function getWeekSubjectGoals(): Collection
  1786.     {
  1787.         return $this->weekSubjectGoals;
  1788.     }
  1789.     public function addWeekSubjectGoal(WeekSubjectGoal $weekSubjectGoal): static
  1790.     {
  1791.         if (!$this->weekSubjectGoals->contains($weekSubjectGoal)) {
  1792.             $this->weekSubjectGoals->add($weekSubjectGoal);
  1793.             $weekSubjectGoal->setYear($this);
  1794.         }
  1795.         return $this;
  1796.     }
  1797.     public function removeWeekSubjectGoal(WeekSubjectGoal $weekSubjectGoal): static
  1798.     {
  1799.         if ($this->weekSubjectGoals->removeElement($weekSubjectGoal)) {
  1800.             // set the owning side to null (unless already changed)
  1801.             if ($weekSubjectGoal->getYear() === $this) {
  1802.                 $weekSubjectGoal->setYear(null);
  1803.             }
  1804.         }
  1805.         return $this;
  1806.     }
  1807.     /**
  1808.      * @return Collection<int, ProfSchoolPlanner>
  1809.      */
  1810.     public function getProfSchoolPlanners(): Collection
  1811.     {
  1812.         return $this->profSchoolPlanners;
  1813.     }
  1814.     public function addProfSchoolPlanner(ProfSchoolPlanner $profSchoolPlanner): static
  1815.     {
  1816.         if (!$this->profSchoolPlanners->contains($profSchoolPlanner)) {
  1817.             $this->profSchoolPlanners->add($profSchoolPlanner);
  1818.             $profSchoolPlanner->setYear($this);
  1819.         }
  1820.         return $this;
  1821.     }
  1822.     public function removeProfSchoolPlanner(ProfSchoolPlanner $profSchoolPlanner): static
  1823.     {
  1824.         if ($this->profSchoolPlanners->removeElement($profSchoolPlanner)) {
  1825.             // set the owning side to null (unless already changed)
  1826.             if ($profSchoolPlanner->getYear() === $this) {
  1827.                 $profSchoolPlanner->setYear(null);
  1828.             }
  1829.         }
  1830.         return $this;
  1831.     }
  1832.     /**
  1833.      * @return Collection<int, ProfTime>
  1834.      */
  1835.     public function getProfTimes(): Collection
  1836.     {
  1837.         return $this->profTimes;
  1838.     }
  1839.     public function addProfTime(ProfTime $profTime): static
  1840.     {
  1841.         if (!$this->profTimes->contains($profTime)) {
  1842.             $this->profTimes->add($profTime);
  1843.             $profTime->setYear($this);
  1844.         }
  1845.         return $this;
  1846.     }
  1847.     public function removeProfTime(ProfTime $profTime): static
  1848.     {
  1849.         if ($this->profTimes->removeElement($profTime)) {
  1850.             // set the owning side to null (unless already changed)
  1851.             if ($profTime->getYear() === $this) {
  1852.                 $profTime->setYear(null);
  1853.             }
  1854.         }
  1855.         return $this;
  1856.     }
  1857.     /**
  1858.      * @return Collection<int, SchoolPlannerType>
  1859.      */
  1860.     public function getSchoolPlannerTypes(): Collection
  1861.     {
  1862.         return $this->schoolPlannerTypes;
  1863.     }
  1864.     public function addSchoolPlannerType(SchoolPlannerType $schoolPlannerType): static
  1865.     {
  1866.         if (!$this->schoolPlannerTypes->contains($schoolPlannerType)) {
  1867.             $this->schoolPlannerTypes->add($schoolPlannerType);
  1868.             $schoolPlannerType->setYear($this);
  1869.         }
  1870.         return $this;
  1871.     }
  1872.     public function removeSchoolPlannerType(SchoolPlannerType $schoolPlannerType): static
  1873.     {
  1874.         if ($this->schoolPlannerTypes->removeElement($schoolPlannerType)) {
  1875.             // set the owning side to null (unless already changed)
  1876.             if ($schoolPlannerType->getYear() === $this) {
  1877.                 $schoolPlannerType->setYear(null);
  1878.             }
  1879.         }
  1880.         return $this;
  1881.     }
  1882.     /**
  1883.      * @return Collection<int, AgendaElement>
  1884.      */
  1885.     public function getAgendaElements(): Collection
  1886.     {
  1887.         return $this->agendaElements;
  1888.     }
  1889.     public function addAgendaElement(AgendaElement $agendaElement): static
  1890.     {
  1891.         if (!$this->agendaElements->contains($agendaElement)) {
  1892.             $this->agendaElements->add($agendaElement);
  1893.             $agendaElement->setYear($this);
  1894.         }
  1895.         return $this;
  1896.     }
  1897.     public function removeAgendaElement(AgendaElement $agendaElement): static
  1898.     {
  1899.         if ($this->agendaElements->removeElement($agendaElement)) {
  1900.             // set the owning side to null (unless already changed)
  1901.             if ($agendaElement->getYear() === $this) {
  1902.                 $agendaElement->setYear(null);
  1903.             }
  1904.         }
  1905.         return $this;
  1906.     }
  1907.     /**
  1908.      * @return Collection<int, GlobalSchoolBreak>
  1909.      */
  1910.     public function getGlobalSchoolBreaks(): Collection
  1911.     {
  1912.         return $this->globalSchoolBreaks;
  1913.     }
  1914.     public function addGlobalSchoolBreak(GlobalSchoolBreak $globalSchoolBreak): static
  1915.     {
  1916.         if (!$this->globalSchoolBreaks->contains($globalSchoolBreak)) {
  1917.             $this->globalSchoolBreaks->add($globalSchoolBreak);
  1918.             $globalSchoolBreak->setYear($this);
  1919.         }
  1920.         return $this;
  1921.     }
  1922.     public function removeGlobalSchoolBreak(GlobalSchoolBreak $globalSchoolBreak): static
  1923.     {
  1924.         if ($this->globalSchoolBreaks->removeElement($globalSchoolBreak)) {
  1925.             // set the owning side to null (unless already changed)
  1926.             if ($globalSchoolBreak->getYear() === $this) {
  1927.                 $globalSchoolBreak->setYear(null);
  1928.             }
  1929.         }
  1930.         return $this;
  1931.     }
  1932.     /**
  1933.      * @return Collection<int, TeacherAbsence>
  1934.      */
  1935.     public function getTeacherAbsences(): Collection
  1936.     {
  1937.         return $this->teacherAbsences;
  1938.     }
  1939.     public function addTeacherAbsence(TeacherAbsence $teacherAbsence): static
  1940.     {
  1941.         if (!$this->teacherAbsences->contains($teacherAbsence)) {
  1942.             $this->teacherAbsences->add($teacherAbsence);
  1943.             $teacherAbsence->setYear($this);
  1944.         }
  1945.         return $this;
  1946.     }
  1947.     public function removeTeacherAbsence(TeacherAbsence $teacherAbsence): static
  1948.     {
  1949.         if ($this->teacherAbsences->removeElement($teacherAbsence)) {
  1950.             // set the owning side to null (unless already changed)
  1951.             if ($teacherAbsence->getYear() === $this) {
  1952.                 $teacherAbsence->setYear(null);
  1953.             }
  1954.         }
  1955.         return $this;
  1956.     }
  1957.     /**
  1958.      * @return Collection<int, AttendanceMissed>
  1959.      */
  1960.     public function getAttendanceMisseds(): Collection
  1961.     {
  1962.         return $this->attendanceMisseds;
  1963.     }
  1964.     public function addAttendanceMissed(AttendanceMissed $attendanceMissed): static
  1965.     {
  1966.         if (!$this->attendanceMisseds->contains($attendanceMissed)) {
  1967.             $this->attendanceMisseds->add($attendanceMissed);
  1968.             $attendanceMissed->setYear($this);
  1969.         }
  1970.         return $this;
  1971.     }
  1972.     public function removeAttendanceMissed(AttendanceMissed $attendanceMissed): static
  1973.     {
  1974.         if ($this->attendanceMisseds->removeElement($attendanceMissed)) {
  1975.             // set the owning side to null (unless already changed)
  1976.             if ($attendanceMissed->getYear() === $this) {
  1977.                 $attendanceMissed->setYear(null);
  1978.             }
  1979.         }
  1980.         return $this;
  1981.     }
  1982.     /**
  1983.      * @return Collection<int, GeneralBreak>
  1984.      */
  1985.     public function getGeneralBreaks(): Collection
  1986.     {
  1987.         return $this->generalBreaks;
  1988.     }
  1989.     public function addGeneralBreak(GeneralBreak $generalBreak): static
  1990.     {
  1991.         if (!$this->generalBreaks->contains($generalBreak)) {
  1992.             $this->generalBreaks->add($generalBreak);
  1993.             $generalBreak->setYear($this);
  1994.         }
  1995.         return $this;
  1996.     }
  1997.     public function removeGeneralBreak(GeneralBreak $generalBreak): static
  1998.     {
  1999.         if ($this->generalBreaks->removeElement($generalBreak)) {
  2000.             // set the owning side to null (unless already changed)
  2001.             if ($generalBreak->getYear() === $this) {
  2002.                 $generalBreak->setYear(null);
  2003.             }
  2004.         }
  2005.         return $this;
  2006.     }
  2007.     public function getLevel(): ?int
  2008.     {
  2009.         return $this->level;
  2010.     }
  2011.     public function setLevel(?int $level): static
  2012.     {
  2013.         $this->level $level;
  2014.         return $this;
  2015.     }
  2016. }