<?php
namespace App\Entity;
use App\Repository\SchoolYearRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use App\Entity\Traits\Timestampable;
#[ORM\HasLifecycleCallbacks]
#[ORM\Entity(repositoryClass: SchoolYearRepository::class)]
#[UniqueEntity(fields: ['name'], message: 'cette année existe deja')]
class SchoolYear
{
use Timestampable;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column]
private ?bool $active = null;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: UserYear::class)]
private Collection $userYears;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: StudentYear::class)]
private Collection $studentYears;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: HomeWork::class)]
private Collection $homeWorks;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: HomeWorkYear::class)]
private Collection $homeWorkYears;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Late::class)]
private Collection $lates;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Chat::class)]
private Collection $chats;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Absence::class)]
private Collection $absences;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Note::class)]
private Collection $notes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Exams::class)]
private Collection $exams;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DocInfo::class)]
private Collection $docInfos;
#[ORM\ManyToOne(inversedBy: 'schoolYears', cascade: ["persist"])]
private ?User $author = null;
#[ORM\ManyToOne(inversedBy: 'schoolYearsEdited', cascade: ["persist"])]
private ?User $editor = null;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Punish::class)]
private Collection $punishes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Discussion::class)]
private Collection $discussions;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DiscussionClass::class)]
private Collection $discussionClasses;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Agenda::class)]
private Collection $agendas;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: ExamAgenda::class)]
private Collection $examAgendas;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Quarter::class, orphanRemoval: true)]
private Collection $quarters;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: GlobalQuarter::class)]
private Collection $globalQuarters;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Appreciation::class, orphanRemoval: true)]
private Collection $appreciations;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: LocalAccount::class)]
private Collection $localAccounts;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DisciplineWarning::class)]
private Collection $disciplineWarnings;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DisciplineBlame::class)]
private Collection $disciplineBlames;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DisciplineExclusion::class)]
private Collection $disciplineExclusions;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: ParentNote::class)]
private Collection $parentNotes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: JustifyAbsence::class)]
private Collection $justifyAbsences;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Subject::class)]
private Collection $subjects;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AbsenceRetainedConfig::class)]
private Collection $absenceRetainedConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AbsenceWarningConfig::class)]
private Collection $absenceWarningConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AbsenceExclusionConfig::class)]
private Collection $absenceExclusionConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AbsenceBlameConfig::class)]
private Collection $absenceBlameConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DisciplineRetained::class)]
private Collection $disciplineRetaineds;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DefinitiveExclusion::class)]
private Collection $definitiveExclusions;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DisciplineConcile::class)]
private Collection $disciplineConciles;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AbsenceDisciplineConcileConfig::class)]
private Collection $absenceDisciplineConcileConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: WarningBlameConfig::class)]
private Collection $warningBlameConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: WarningDefinitiveExlusionConfig::class)]
private Collection $warningDefinitiveExlusionConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: PrimaryParentNote::class)]
private Collection $primaryParentNotes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: PrimaryNote::class)]
private Collection $primaryNotes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: VerbalProcessCategory::class)]
private Collection $verbalProcessCategories;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: GlobalDisciplineConfig::class)]
private Collection $globalDisciplineConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: DisciplinePunish::class)]
private Collection $disciplinePunishes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: GlobalDisciplineEnabledConfig::class)]
private Collection $globalDisciplineEnabledConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: BlamePunishConfig::class)]
private Collection $blamePunishConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AbsencePunishConfig::class)]
private Collection $absencePunishConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: WarningPunishConfig::class)]
private Collection $warningPunishConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: PunishRetainedConfig::class)]
private Collection $punishRetainedConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: PunishWarningConfig::class)]
private Collection $punishWarningConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: PunishBlameConfig::class)]
private Collection $punishBlameConfigs;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: PunishExclusionConfig::class)]
private Collection $punishExclusionConfigs;
#[ORM\Column(length: 255)]
private ?string $nameEn = null;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: SchoolYearInfos::class)]
private Collection $schoolYearInfos;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Blame::class)]
private Collection $blames;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Warning::class)]
private Collection $warnings;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Retained::class)]
private Collection $retaineds;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: HonnorTableLimitMoy::class)]
private Collection $honnorTableLimitMoys;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: News::class)]
private Collection $news;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Event::class)]
private Collection $events;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AdmissionLimit::class)]
private Collection $admissionLimits;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AgendaDay::class)]
private Collection $agendaDays;
#[ORM\OneToOne(mappedBy: 'year', cascade: ['persist'])]
private ?AgendaTimeConvertion $agendaTimeConvertion = null;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: ExamWeek::class)]
private Collection $examWeeks;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: Competence::class)]
private Collection $competences;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: WeekSubjectGoal::class)]
private Collection $weekSubjectGoals;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: ProfSchoolPlanner::class)]
private Collection $profSchoolPlanners;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: ProfTime::class)]
private Collection $profTimes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: SchoolPlannerType::class)]
private Collection $schoolPlannerTypes;
#[ORM\OneToMany(mappedBy: 'year', targetEntity: AgendaElement::class)]
private Collection $agendaElements;
public function __construct()
{
$this->userYears = new ArrayCollection();
$this->studentYears = new ArrayCollection();
$this->homeWorks = new ArrayCollection();
$this->homeWorkYears = new ArrayCollection();
$this->lates = new ArrayCollection();
$this->chats = new ArrayCollection();
$this->absences = new ArrayCollection();
$this->notes = new ArrayCollection();
$this->exams = new ArrayCollection();
$this->docInfos = new ArrayCollection();
$this->punishes = new ArrayCollection();
$this->discussions = new ArrayCollection();
$this->discussionClasses = new ArrayCollection();
$this->agendas = new ArrayCollection();
$this->examAgendas = new ArrayCollection();
$this->quarters = new ArrayCollection();
$this->globalQuarters = new ArrayCollection();
$this->appreciations = new ArrayCollection();
$this->localAccounts = new ArrayCollection();
$this->disciplineWarnings = new ArrayCollection();
$this->disciplineBlames = new ArrayCollection();
$this->disciplineExclusions = new ArrayCollection();
$this->parentNotes = new ArrayCollection();
$this->justifyAbsences = new ArrayCollection();
$this->subjects = new ArrayCollection();
$this->absenceRetainedConfigs = new ArrayCollection();
$this->absenceWarningConfigs = new ArrayCollection();
$this->absenceExclusionConfigs = new ArrayCollection();
$this->absenceBlameConfigs = new ArrayCollection();
$this->disciplineRetaineds = new ArrayCollection();
$this->definitiveExclusions = new ArrayCollection();
$this->disciplineConciles = new ArrayCollection();
$this->absenceDisciplineConcileConfigs = new ArrayCollection();
$this->warningBlameConfigs = new ArrayCollection();
$this->warningDefinitiveExlusionConfigs = new ArrayCollection();
$this->primaryParentNotes = new ArrayCollection();
$this->primaryNotes = new ArrayCollection();
$this->verbalProcessCategories = new ArrayCollection();
$this->globalDisciplineConfigs = new ArrayCollection();
$this->disciplinePunishes = new ArrayCollection();
$this->globalDisciplineEnabledConfigs = new ArrayCollection();
$this->blamePunishConfigs = new ArrayCollection();
$this->absencePunishConfigs = new ArrayCollection();
$this->warningPunishConfigs = new ArrayCollection();
$this->punishRetainedConfigs = new ArrayCollection();
$this->punishWarningConfigs = new ArrayCollection();
$this->punishBlameConfigs = new ArrayCollection();
$this->punishExclusionConfigs = new ArrayCollection();
$this->schoolYearInfos = new ArrayCollection();
$this->blames = new ArrayCollection();
$this->warnings = new ArrayCollection();
$this->retaineds = new ArrayCollection();
$this->honnorTableLimitMoys = new ArrayCollection();
$this->news = new ArrayCollection();
$this->events = new ArrayCollection();
$this->admissionLimits = new ArrayCollection();
$this->agendaDays = new ArrayCollection();
$this->examWeeks = new ArrayCollection();
$this->competences = new ArrayCollection();
$this->weekSubjectGoals = new ArrayCollection();
$this->profSchoolPlanners = new ArrayCollection();
$this->profTimes = new ArrayCollection();
$this->schoolPlannerTypes = new ArrayCollection();
$this->agendaElements = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): static
{
$this->active = $active;
return $this;
}
/**
* @return Collection<int, UserYear>
*/
public function getUserYears(): Collection
{
return $this->userYears;
}
public function addUserYear(UserYear $userYear): static
{
if (!$this->userYears->contains($userYear)) {
$this->userYears->add($userYear);
$userYear->setYear($this);
}
return $this;
}
public function removeUserYear(UserYear $userYear): static
{
if ($this->userYears->removeElement($userYear)) {
// set the owning side to null (unless already changed)
if ($userYear->getYear() === $this) {
$userYear->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, StudentYear>
*/
public function getStudentYears(): Collection
{
return $this->studentYears;
}
public function addStudentYear(StudentYear $studentYear): static
{
if (!$this->studentYears->contains($studentYear)) {
$this->studentYears->add($studentYear);
$studentYear->setYear($this);
}
return $this;
}
public function removeStudentYear(StudentYear $studentYear): static
{
if ($this->studentYears->removeElement($studentYear)) {
// set the owning side to null (unless already changed)
if ($studentYear->getYear() === $this) {
$studentYear->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, HomeWork>
*/
public function getHomeWorks(): Collection
{
return $this->homeWorks;
}
public function addHomeWork(HomeWork $homeWork): static
{
if (!$this->homeWorks->contains($homeWork)) {
$this->homeWorks->add($homeWork);
$homeWork->setYear($this);
}
return $this;
}
public function removeHomeWork(HomeWork $homeWork): static
{
if ($this->homeWorks->removeElement($homeWork)) {
// set the owning side to null (unless already changed)
if ($homeWork->getYear() === $this) {
$homeWork->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, HomeWorkYear>
*/
public function getHomeWorkYears(): Collection
{
return $this->homeWorkYears;
}
public function addHomeWorkYear(HomeWorkYear $homeWorkYear): static
{
if (!$this->homeWorkYears->contains($homeWorkYear)) {
$this->homeWorkYears->add($homeWorkYear);
$homeWorkYear->setYear($this);
}
return $this;
}
public function removeHomeWorkYear(HomeWorkYear $homeWorkYear): static
{
if ($this->homeWorkYears->removeElement($homeWorkYear)) {
// set the owning side to null (unless already changed)
if ($homeWorkYear->getYear() === $this) {
$homeWorkYear->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Late>
*/
public function getLates(): Collection
{
return $this->lates;
}
public function addLate(Late $late): static
{
if (!$this->lates->contains($late)) {
$this->lates->add($late);
$late->setYear($this);
}
return $this;
}
public function removeLate(Late $late): static
{
if ($this->lates->removeElement($late)) {
// set the owning side to null (unless already changed)
if ($late->getYear() === $this) {
$late->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Chat>
*/
public function getChats(): Collection
{
return $this->chats;
}
public function addChat(Chat $chat): static
{
if (!$this->chats->contains($chat)) {
$this->chats->add($chat);
$chat->setYear($this);
}
}
/**
* @return Collection<int, Absence>
*/
public function getAbsences(): Collection
{
return $this->absences;
}
public function addAbsence(Absence $absence): static
{
if (!$this->absences->contains($absence)) {
$this->absences->add($absence);
$absence->setYear($this);
}
return $this;
}
public function removeChat(Chat $chat): static
{
if ($this->chats->removeElement($chat)) {
// set the owning side to null (unless already changed)
if ($chat->getYear() === $this) {
$chat->setYear(null);
}
}
return $this;
}
public function removeAbsence(Absence $absence): static
{
if ($this->absences->removeElement($absence)) {
// set the owning side to null (unless already changed)
if ($absence->getYear() === $this) {
$absence->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Note>
*/
public function getNotes(): Collection
{
return $this->notes;
}
public function addNote(Note $note): static
{
if (!$this->notes->contains($note)) {
$this->notes->add($note);
$note->setYear($this);
}
return $this;
}
public function removeNote(Note $note): static
{
if ($this->notes->removeElement($note)) {
// set the owning side to null (unless already changed)
if ($note->getYear() === $this) {
$note->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Exams>
*/
public function getExams(): Collection
{
return $this->exams;
}
public function addExam(Exams $exam): static
{
if (!$this->exams->contains($exam)) {
$this->exams->add($exam);
$exam->setYear($this);
}
return $this;
}
public function removeExam(Exams $exam): static
{
if ($this->exams->removeElement($exam)) {
// set the owning side to null (unless already changed)
if ($exam->getYear() === $this) {
$exam->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DocInfo>
*/
public function getDocInfos(): Collection
{
return $this->docInfos;
}
public function addDocInfo(DocInfo $docInfo): static
{
if (!$this->docInfos->contains($docInfo)) {
$this->docInfos->add($docInfo);
$docInfo->setYear($this);
}
return $this;
}
public function removeDocInfo(DocInfo $docInfo): static
{
if ($this->docInfos->removeElement($docInfo)) {
// set the owning side to null (unless already changed)
if ($docInfo->getYear() === $this) {
$docInfo->setYear(null);
}
}
return $this;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): static
{
$this->author = $author;
return $this;
}
/**
* @return Collection<int, Punish>
*/
public function getPunishes(): Collection
{
return $this->punishes;
}
public function addPunish(Punish $punish): static
{
if (!$this->punishes->contains($punish)) {
$this->punishes->add($punish);
$punish->setYear($this);
}
return $this;
}
public function removePunish(Punish $punish): static
{
if ($this->punishes->removeElement($punish)) {
// set the owning side to null (unless already changed)
if ($punish->getYear() === $this) {
$punish->setYear(null);
}
}
return $this;
}
public function getEditor(): ?User
{
return $this->editor;
}
public function setEditor(?User $editor): static
{
$this->editor = $editor;
return $this;
}
/**
* @return Collection<int, Discussion>
*/
public function getDiscussions(): Collection
{
return $this->discussions;
}
public function addDiscussion(Discussion $discussion): static
{
if (!$this->discussions->contains($discussion)) {
$this->discussions->add($discussion);
$discussion->setYear($this);
}
return $this;
}
public function removeDiscussion(Discussion $discussion): static
{
if ($this->discussions->removeElement($discussion)) {
// set the owning side to null (unless already changed)
if ($discussion->getYear() === $this) {
$discussion->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DiscussionClass>
*/
public function getDiscussionClasses(): Collection
{
return $this->discussionClasses;
}
public function addDiscussionClass(DiscussionClass $discussionClass): static
{
if (!$this->discussionClasses->contains($discussionClass)) {
$this->discussionClasses->add($discussionClass);
$discussionClass->setYear($this);
}
return $this;
}
public function removeDiscussionClass(DiscussionClass $discussionClass): static
{
if ($this->discussionClasses->removeElement($discussionClass)) {
// set the owning side to null (unless already changed)
if ($discussionClass->getYear() === $this) {
$discussionClass->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Agenda>
*/
public function getAgendas(): Collection
{
return $this->agendas;
}
public function addAgenda(Agenda $agenda): static
{
if (!$this->agendas->contains($agenda)) {
$this->agendas->add($agenda);
$agenda->setYear($this);
}
return $this;
}
public function removeAgenda(Agenda $agenda): static
{
if ($this->agendas->removeElement($agenda)) {
// set the owning side to null (unless already changed)
if ($agenda->getYear() === $this) {
$agenda->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, ExamAgenda>
*/
public function getExamAgendas(): Collection
{
return $this->examAgendas;
}
public function addExamAgenda(ExamAgenda $examAgenda): static
{
if (!$this->examAgendas->contains($examAgenda)) {
$this->examAgendas->add($examAgenda);
$examAgenda->setYear($this);
}
return $this;
}
public function removeExamAgenda(ExamAgenda $examAgenda): static
{
if ($this->examAgendas->removeElement($examAgenda)) {
// set the owning side to null (unless already changed)
if ($examAgenda->getYear() === $this) {
$examAgenda->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Quarter>
*/
public function getQuarters(): Collection
{
return $this->quarters;
}
public function addQuarter(Quarter $quarter): static
{
if (!$this->quarters->contains($quarter)) {
$this->quarters->add($quarter);
$quarter->setYear($this);
}
return $this;
}
public function removeQuarter(Quarter $quarter): static
{
if ($this->quarters->removeElement($quarter)) {
// set the owning side to null (unless already changed)
if ($quarter->getYear() === $this) {
$quarter->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, GlobalQuarter>
*/
public function getGlobalQuarters(): Collection
{
return $this->globalQuarters;
}
public function addGlobalQuarter(GlobalQuarter $globalQuarter): static
{
if (!$this->globalQuarters->contains($globalQuarter)) {
$this->globalQuarters->add($globalQuarter);
$globalQuarter->setYear($this);
}
return $this;
}
public function removeGlobalQuarter(GlobalQuarter $globalQuarter): static
{
if ($this->globalQuarters->removeElement($globalQuarter)) {
// set the owning side to null (unless already changed)
if ($globalQuarter->getYear() === $this) {
$globalQuarter->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, LocalAccount>
*/
public function getLocalAccounts(): Collection
{
return $this->localAccounts;
}
public function addLocalAccount(LocalAccount $localAccount): static
{
if (!$this->localAccounts->contains($localAccount)) {
$this->localAccounts->add($localAccount);
$localAccount->setYear($this);
}
return $this;
}
public function removeLocalAccount(LocalAccount $localAccount): static
{
if ($this->localAccounts->removeElement($localAccount)) {
// set the owning side to null (unless already changed)
if ($localAccount->getYear() === $this) {
$localAccount->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Appreciation>
*/
public function getAppreciations(): Collection
{
return $this->appreciations;
}
public function addAppreciation(Appreciation $appreciation): static
{
if (!$this->appreciations->contains($appreciation)) {
$this->appreciations->add($appreciation);
$appreciation->setYear($this);
}
return $this;
}
public function removeAppreciation(Appreciation $appreciation): static
{
if ($this->appreciations->removeElement($appreciation)) {
// set the owning side to null (unless already changed)
if ($appreciation->getYear() === $this) {
$appreciation->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DisciplineWarning>
*/
public function getDisciplineWarnings(): Collection
{
return $this->disciplineWarnings;
}
public function addDisciplineWarning(DisciplineWarning $disciplineWarning): static
{
if (!$this->disciplineWarnings->contains($disciplineWarning)) {
$this->disciplineWarnings->add($disciplineWarning);
$disciplineWarning->setYear($this);
}
return $this;
}
public function removeDisciplineWarning(DisciplineWarning $disciplineWarning): static
{
if ($this->disciplineWarnings->removeElement($disciplineWarning)) {
// set the owning side to null (unless already changed)
if ($disciplineWarning->getYear() === $this) {
$disciplineWarning->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DisciplineBlame>
*/
public function getDisciplineBlames(): Collection
{
return $this->disciplineBlames;
}
public function addDisciplineBlame(DisciplineBlame $disciplineBlame): static
{
if (!$this->disciplineBlames->contains($disciplineBlame)) {
$this->disciplineBlames->add($disciplineBlame);
$disciplineBlame->setYear($this);
}
return $this;
}
public function removeDisciplineBlame(DisciplineBlame $disciplineBlame): static
{
if ($this->disciplineBlames->removeElement($disciplineBlame)) {
// set the owning side to null (unless already changed)
if ($disciplineBlame->getYear() === $this) {
$disciplineBlame->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DisciplineExclusion>
*/
public function getDisciplineExclusions(): Collection
{
return $this->disciplineExclusions;
}
public function addDisciplineExclusion(DisciplineExclusion $disciplineExclusion): static
{
if (!$this->disciplineExclusions->contains($disciplineExclusion)) {
$this->disciplineExclusions->add($disciplineExclusion);
$disciplineExclusion->setYear($this);
}
return $this;
}
public function removeDisciplineExclusion(DisciplineExclusion $disciplineExclusion): static
{
if ($this->disciplineExclusions->removeElement($disciplineExclusion)) {
// set the owning side to null (unless already changed)
if ($disciplineExclusion->getYear() === $this) {
$disciplineExclusion->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, ParentNote>
*/
public function getParentNotes(): Collection
{
return $this->parentNotes;
}
public function addParentNote(ParentNote $parentNote): static
{
if (!$this->parentNotes->contains($parentNote)) {
$this->parentNotes->add($parentNote);
$parentNote->setYear($this);
}
return $this;
}
public function removeParentNote(ParentNote $parentNote): static
{
if ($this->parentNotes->removeElement($parentNote)) {
// set the owning side to null (unless already changed)
if ($parentNote->getYear() === $this) {
$parentNote->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, JustifyAbsence>
*/
public function getJustifyAbsences(): Collection
{
return $this->justifyAbsences;
}
public function addJustifyAbsence(JustifyAbsence $justifyAbsence): static
{
if (!$this->justifyAbsences->contains($justifyAbsence)) {
$this->justifyAbsences->add($justifyAbsence);
$justifyAbsence->setYear($this);
}
return $this;
}
public function removeJustifyAbsence(JustifyAbsence $justifyAbsence): static
{
if ($this->justifyAbsences->removeElement($justifyAbsence)) {
// set the owning side to null (unless already changed)
if ($justifyAbsence->getYear() === $this) {
$justifyAbsence->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Subject>
*/
public function getSubjects(): Collection
{
return $this->subjects;
}
public function addSubject(Subject $subject): static
{
if (!$this->subjects->contains($subject)) {
$this->subjects->add($subject);
$subject->setYear($this);
}
return $this;
}
public function removeSubject(Subject $subject): static
{
if ($this->subjects->removeElement($subject)) {
// set the owning side to null (unless already changed)
if ($subject->getYear() === $this) {
$subject->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AbsenceRetainedConfig>
*/
public function getAbsenceRetainedConfigs(): Collection
{
return $this->absenceRetainedConfigs;
}
public function addAbsenceRetainedConfig(AbsenceRetainedConfig $absenceRetainedConfig): static
{
if (!$this->absenceRetainedConfigs->contains($absenceRetainedConfig)) {
$this->absenceRetainedConfigs->add($absenceRetainedConfig);
$absenceRetainedConfig->setYear($this);
}
return $this;
}
public function removeAbsenceRetainedConfig(AbsenceRetainedConfig $absenceRetainedConfig): static
{
if ($this->absenceRetainedConfigs->removeElement($absenceRetainedConfig)) {
// set the owning side to null (unless already changed)
if ($absenceRetainedConfig->getYear() === $this) {
$absenceRetainedConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AbsenceWarningConfig>
*/
public function getAbsenceWarningConfigs(): Collection
{
return $this->absenceWarningConfigs;
}
public function addAbsenceWarningConfig(AbsenceWarningConfig $absenceWarningConfig): static
{
if (!$this->absenceWarningConfigs->contains($absenceWarningConfig)) {
$this->absenceWarningConfigs->add($absenceWarningConfig);
$absenceWarningConfig->setYear($this);
}
return $this;
}
public function removeAbsenceWarningConfig(AbsenceWarningConfig $absenceWarningConfig): static
{
if ($this->absenceWarningConfigs->removeElement($absenceWarningConfig)) {
// set the owning side to null (unless already changed)
if ($absenceWarningConfig->getYear() === $this) {
$absenceWarningConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AbsenceExclusionConfig>
*/
public function getAbsenceExclusionConfigs(): Collection
{
return $this->absenceExclusionConfigs;
}
public function addAbsenceExclusionConfig(AbsenceExclusionConfig $absenceExclusionConfig): static
{
if (!$this->absenceExclusionConfigs->contains($absenceExclusionConfig)) {
$this->absenceExclusionConfigs->add($absenceExclusionConfig);
$absenceExclusionConfig->setYear($this);
}
return $this;
}
public function removeAbsenceExclusionConfig(AbsenceExclusionConfig $absenceExclusionConfig): static
{
if ($this->absenceExclusionConfigs->removeElement($absenceExclusionConfig)) {
// set the owning side to null (unless already changed)
if ($absenceExclusionConfig->getYear() === $this) {
$absenceExclusionConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AbsenceBlameConfig>
*/
public function getAbsenceBlameConfigs(): Collection
{
return $this->absenceBlameConfigs;
}
public function addAbsenceBlameConfig(AbsenceBlameConfig $absenceBlameConfig): static
{
if (!$this->absenceBlameConfigs->contains($absenceBlameConfig)) {
$this->absenceBlameConfigs->add($absenceBlameConfig);
$absenceBlameConfig->setYear($this);
}
return $this;
}
public function removeAbsenceBlameConfig(AbsenceBlameConfig $absenceBlameConfig): static
{
if ($this->absenceBlameConfigs->removeElement($absenceBlameConfig)) {
// set the owning side to null (unless already changed)
if ($absenceBlameConfig->getYear() === $this) {
$absenceBlameConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DisciplineRetained>
*/
public function getDisciplineRetaineds(): Collection
{
return $this->disciplineRetaineds;
}
public function addDisciplineRetained(DisciplineRetained $disciplineRetained): static
{
if (!$this->disciplineRetaineds->contains($disciplineRetained)) {
$this->disciplineRetaineds->add($disciplineRetained);
$disciplineRetained->setYear($this);
}
return $this;
}
public function removeDisciplineRetained(DisciplineRetained $disciplineRetained): static
{
if ($this->disciplineRetaineds->removeElement($disciplineRetained)) {
// set the owning side to null (unless already changed)
if ($disciplineRetained->getYear() === $this) {
$disciplineRetained->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DefinitiveExclusion>
*/
public function getDefinitiveExclusions(): Collection
{
return $this->definitiveExclusions;
}
public function addDefinitiveExclusion(DefinitiveExclusion $definitiveExclusion): static
{
if (!$this->definitiveExclusions->contains($definitiveExclusion)) {
$this->definitiveExclusions->add($definitiveExclusion);
$definitiveExclusion->setYear($this);
}
return $this;
}
public function removeDefinitiveExclusion(DefinitiveExclusion $definitiveExclusion): static
{
if ($this->definitiveExclusions->removeElement($definitiveExclusion)) {
// set the owning side to null (unless already changed)
if ($definitiveExclusion->getYear() === $this) {
$definitiveExclusion->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DisciplineConcile>
*/
public function getDisciplineConciles(): Collection
{
return $this->disciplineConciles;
}
public function addDisciplineConcile(DisciplineConcile $disciplineConcile): static
{
if (!$this->disciplineConciles->contains($disciplineConcile)) {
$this->disciplineConciles->add($disciplineConcile);
$disciplineConcile->setYear($this);
}
return $this;
}
public function removeDisciplineConcile(DisciplineConcile $disciplineConcile): static
{
if ($this->disciplineConciles->removeElement($disciplineConcile)) {
// set the owning side to null (unless already changed)
if ($disciplineConcile->getYear() === $this) {
$disciplineConcile->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AbsenceDisciplineConcileConfig>
*/
public function getAbsenceDisciplineConcileConfigs(): Collection
{
return $this->absenceDisciplineConcileConfigs;
}
public function addAbsenceDisciplineConcileConfig(AbsenceDisciplineConcileConfig $absenceDisciplineConcileConfig): static
{
if (!$this->absenceDisciplineConcileConfigs->contains($absenceDisciplineConcileConfig)) {
$this->absenceDisciplineConcileConfigs->add($absenceDisciplineConcileConfig);
$absenceDisciplineConcileConfig->setYear($this);
}
return $this;
}
public function removeAbsenceDisciplineConcileConfig(AbsenceDisciplineConcileConfig $absenceDisciplineConcileConfig): static
{
if ($this->absenceDisciplineConcileConfigs->removeElement($absenceDisciplineConcileConfig)) {
// set the owning side to null (unless already changed)
if ($absenceDisciplineConcileConfig->getYear() === $this) {
$absenceDisciplineConcileConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, WarningBlameConfig>
*/
public function getWarningBlameConfigs(): Collection
{
return $this->warningBlameConfigs;
}
public function addWarningBlameConfig(WarningBlameConfig $warningBlameConfig): static
{
if (!$this->warningBlameConfigs->contains($warningBlameConfig)) {
$this->warningBlameConfigs->add($warningBlameConfig);
$warningBlameConfig->setYear($this);
}
return $this;
}
public function removeWarningBlameConfig(WarningBlameConfig $warningBlameConfig): static
{
if ($this->warningBlameConfigs->removeElement($warningBlameConfig)) {
// set the owning side to null (unless already changed)
if ($warningBlameConfig->getYear() === $this) {
$warningBlameConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, WarningDefinitiveExlusionConfig>
*/
public function getWarningDefinitiveExlusionConfigs(): Collection
{
return $this->warningDefinitiveExlusionConfigs;
}
public function addWarningDefinitiveExlusionConfig(WarningDefinitiveExlusionConfig $warningDefinitiveExlusionConfig): static
{
if (!$this->warningDefinitiveExlusionConfigs->contains($warningDefinitiveExlusionConfig)) {
$this->warningDefinitiveExlusionConfigs->add($warningDefinitiveExlusionConfig);
$warningDefinitiveExlusionConfig->setYear($this);
}
return $this;
}
public function removeWarningDefinitiveExlusionConfig(WarningDefinitiveExlusionConfig $warningDefinitiveExlusionConfig): static
{
if ($this->warningDefinitiveExlusionConfigs->removeElement($warningDefinitiveExlusionConfig)) {
// set the owning side to null (unless already changed)
if ($warningDefinitiveExlusionConfig->getYear() === $this) {
$warningDefinitiveExlusionConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, PrimaryParentNote>
*/
public function getPrimaryParentNotes(): Collection
{
return $this->primaryParentNotes;
}
public function addPrimaryParentNote(PrimaryParentNote $primaryParentNote): static
{
if (!$this->primaryParentNotes->contains($primaryParentNote)) {
$this->primaryParentNotes->add($primaryParentNote);
$primaryParentNote->setYear($this);
}
return $this;
}
public function removePrimaryParentNote(PrimaryParentNote $primaryParentNote): static
{
if ($this->primaryParentNotes->removeElement($primaryParentNote)) {
// set the owning side to null (unless already changed)
if ($primaryParentNote->getYear() === $this) {
$primaryParentNote->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, PrimaryNote>
*/
public function getPrimaryNotes(): Collection
{
return $this->primaryNotes;
}
public function addPrimaryNote(PrimaryNote $primaryNote): static
{
if (!$this->primaryNotes->contains($primaryNote)) {
$this->primaryNotes->add($primaryNote);
$primaryNote->setYear($this);
}
return $this;
}
public function removePrimaryNote(PrimaryNote $primaryNote): static
{
if ($this->primaryNotes->removeElement($primaryNote)) {
// set the owning side to null (unless already changed)
if ($primaryNote->getYear() === $this) {
$primaryNote->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, VerbalProcessCategory>
*/
public function getVerbalProcessCategories(): Collection
{
return $this->verbalProcessCategories;
}
public function addVerbalProcessCategory(VerbalProcessCategory $verbalProcessCategory): static
{
if (!$this->verbalProcessCategories->contains($verbalProcessCategory)) {
$this->verbalProcessCategories->add($verbalProcessCategory);
$verbalProcessCategory->setYear($this);
}
return $this;
}
public function removeVerbalProcessCategory(VerbalProcessCategory $verbalProcessCategory): static
{
if ($this->verbalProcessCategories->removeElement($verbalProcessCategory)) {
// set the owning side to null (unless already changed)
if ($verbalProcessCategory->getYear() === $this) {
$verbalProcessCategory->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, GlobalDisciplineConfig>
*/
public function getGlobalDisciplineConfigs(): Collection
{
return $this->globalDisciplineConfigs;
}
public function addGlobalDisciplineConfig(GlobalDisciplineConfig $globalDisciplineConfig): static
{
if (!$this->globalDisciplineConfigs->contains($globalDisciplineConfig)) {
$this->globalDisciplineConfigs->add($globalDisciplineConfig);
$globalDisciplineConfig->setYear($this);
}
return $this;
}
public function removeGlobalDisciplineConfig(GlobalDisciplineConfig $globalDisciplineConfig): static
{
if ($this->globalDisciplineConfigs->removeElement($globalDisciplineConfig)) {
// set the owning side to null (unless already changed)
if ($globalDisciplineConfig->getYear() === $this) {
$globalDisciplineConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, DisciplinePunish>
*/
public function getDisciplinePunishes(): Collection
{
return $this->disciplinePunishes;
}
public function addDisciplinePunish(DisciplinePunish $disciplinePunish): static
{
if (!$this->disciplinePunishes->contains($disciplinePunish)) {
$this->disciplinePunishes->add($disciplinePunish);
$disciplinePunish->setYear($this);
}
return $this;
}
public function removeDisciplinePunish(DisciplinePunish $disciplinePunish): static
{
if ($this->disciplinePunishes->removeElement($disciplinePunish)) {
// set the owning side to null (unless already changed)
if ($disciplinePunish->getYear() === $this) {
$disciplinePunish->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, GlobalDisciplineEnabledConfig>
*/
public function getGlobalDisciplineEnabledConfigs(): Collection
{
return $this->globalDisciplineEnabledConfigs;
}
public function addGlobalDisciplineEnabledConfig(GlobalDisciplineEnabledConfig $globalDisciplineEnabledConfig): static
{
if (!$this->globalDisciplineEnabledConfigs->contains($globalDisciplineEnabledConfig)) {
$this->globalDisciplineEnabledConfigs->add($globalDisciplineEnabledConfig);
$globalDisciplineEnabledConfig->setYear($this);
}
return $this;
}
public function removeGlobalDisciplineEnabledConfig(GlobalDisciplineEnabledConfig $globalDisciplineEnabledConfig): static
{
if ($this->globalDisciplineEnabledConfigs->removeElement($globalDisciplineEnabledConfig)) {
// set the owning side to null (unless already changed)
if ($globalDisciplineEnabledConfig->getYear() === $this) {
$globalDisciplineEnabledConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, BlamePunishConfig>
*/
public function getBlamePunishConfigs(): Collection
{
return $this->blamePunishConfigs;
}
public function addBlamePunishConfig(BlamePunishConfig $blamePunishConfig): static
{
if (!$this->blamePunishConfigs->contains($blamePunishConfig)) {
$this->blamePunishConfigs->add($blamePunishConfig);
$blamePunishConfig->setYear($this);
}
return $this;
}
public function removeBlamePunishConfig(BlamePunishConfig $blamePunishConfig): static
{
if ($this->blamePunishConfigs->removeElement($blamePunishConfig)) {
// set the owning side to null (unless already changed)
if ($blamePunishConfig->getYear() === $this) {
$blamePunishConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AbsencePunishConfig>
*/
public function getAbsencePunishConfigs(): Collection
{
return $this->absencePunishConfigs;
}
public function addAbsencePunishConfig(AbsencePunishConfig $absencePunishConfig): static
{
if (!$this->absencePunishConfigs->contains($absencePunishConfig)) {
$this->absencePunishConfigs->add($absencePunishConfig);
$absencePunishConfig->setYear($this);
}
return $this;
}
public function removeAbsencePunishConfig(AbsencePunishConfig $absencePunishConfig): static
{
if ($this->absencePunishConfigs->removeElement($absencePunishConfig)) {
// set the owning side to null (unless already changed)
if ($absencePunishConfig->getYear() === $this) {
$absencePunishConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, WarningPunishConfig>
*/
public function getWarningPunishConfigs(): Collection
{
return $this->warningPunishConfigs;
}
public function addWarningPunishConfig(WarningPunishConfig $warningPunishConfig): static
{
if (!$this->warningPunishConfigs->contains($warningPunishConfig)) {
$this->warningPunishConfigs->add($warningPunishConfig);
$warningPunishConfig->setYear($this);
}
return $this;
}
public function removeWarningPunishConfig(WarningPunishConfig $warningPunishConfig): static
{
if ($this->warningPunishConfigs->removeElement($warningPunishConfig)) {
// set the owning side to null (unless already changed)
if ($warningPunishConfig->getYear() === $this) {
$warningPunishConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, PunishRetainedConfig>
*/
public function getPunishRetainedConfigs(): Collection
{
return $this->punishRetainedConfigs;
}
public function addPunishRetainedConfig(PunishRetainedConfig $punishRetainedConfig): static
{
if (!$this->punishRetainedConfigs->contains($punishRetainedConfig)) {
$this->punishRetainedConfigs->add($punishRetainedConfig);
$punishRetainedConfig->setYear($this);
}
return $this;
}
public function removePunishRetainedConfig(PunishRetainedConfig $punishRetainedConfig): static
{
if ($this->punishRetainedConfigs->removeElement($punishRetainedConfig)) {
// set the owning side to null (unless already changed)
if ($punishRetainedConfig->getYear() === $this) {
$punishRetainedConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, PunishWarningConfig>
*/
public function getPunishWarningConfigs(): Collection
{
return $this->punishWarningConfigs;
}
public function addPunishWarningConfig(PunishWarningConfig $punishWarningConfig): static
{
if (!$this->punishWarningConfigs->contains($punishWarningConfig)) {
$this->punishWarningConfigs->add($punishWarningConfig);
$punishWarningConfig->setYear($this);
}
return $this;
}
public function removePunishWarningConfig(PunishWarningConfig $punishWarningConfig): static
{
if ($this->punishWarningConfigs->removeElement($punishWarningConfig)) {
// set the owning side to null (unless already changed)
if ($punishWarningConfig->getYear() === $this) {
$punishWarningConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, PunishBlameConfig>
*/
public function getPunishBlameConfigs(): Collection
{
return $this->punishBlameConfigs;
}
public function addPunishBlameConfig(PunishBlameConfig $punishBlameConfig): static
{
if (!$this->punishBlameConfigs->contains($punishBlameConfig)) {
$this->punishBlameConfigs->add($punishBlameConfig);
$punishBlameConfig->setYear($this);
}
return $this;
}
public function removePunishBlameConfig(PunishBlameConfig $punishBlameConfig): static
{
if ($this->punishBlameConfigs->removeElement($punishBlameConfig)) {
// set the owning side to null (unless already changed)
if ($punishBlameConfig->getYear() === $this) {
$punishBlameConfig->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, PunishExclusionConfig>
*/
public function getPunishExclusionConfigs(): Collection
{
return $this->punishExclusionConfigs;
}
public function addPunishExclusionConfig(PunishExclusionConfig $punishExclusionConfig): static
{
if (!$this->punishExclusionConfigs->contains($punishExclusionConfig)) {
$this->punishExclusionConfigs->add($punishExclusionConfig);
$punishExclusionConfig->setYear($this);
}
return $this;
}
public function removePunishExclusionConfig(PunishExclusionConfig $punishExclusionConfig): static
{
if ($this->punishExclusionConfigs->removeElement($punishExclusionConfig)) {
// set the owning side to null (unless already changed)
if ($punishExclusionConfig->getYear() === $this) {
$punishExclusionConfig->setYear(null);
}
}
return $this;
}
public function getNameEn(): ?string
{
return $this->nameEn;
}
public function setNameEn(string $nameEn): static
{
$this->nameEn = $nameEn;
return $this;
}
/**
* @return Collection<int, SchoolYearInfos>
*/
public function getSchoolYearInfos(): Collection
{
return $this->schoolYearInfos;
}
public function addSchoolYearInfo(SchoolYearInfos $schoolYearInfo): static
{
if (!$this->schoolYearInfos->contains($schoolYearInfo)) {
$this->schoolYearInfos->add($schoolYearInfo);
$schoolYearInfo->setYear($this);
}
return $this;
}
public function removeSchoolYearInfo(SchoolYearInfos $schoolYearInfo): static
{
if ($this->schoolYearInfos->removeElement($schoolYearInfo)) {
// set the owning side to null (unless already changed)
if ($schoolYearInfo->getYear() === $this) {
$schoolYearInfo->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Blame>
*/
public function getBlames(): Collection
{
return $this->blames;
}
public function addBlame(Blame $blame): static
{
if (!$this->blames->contains($blame)) {
$this->blames->add($blame);
$blame->setYear($this);
}
return $this;
}
public function removeBlame(Blame $blame): static
{
if ($this->blames->removeElement($blame)) {
// set the owning side to null (unless already changed)
if ($blame->getYear() === $this) {
$blame->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Warning>
*/
public function getWarnings(): Collection
{
return $this->warnings;
}
public function addWarning(Warning $warning): static
{
if (!$this->warnings->contains($warning)) {
$this->warnings->add($warning);
$warning->setYear($this);
}
return $this;
}
public function removeWarning(Warning $warning): static
{
if ($this->warnings->removeElement($warning)) {
// set the owning side to null (unless already changed)
if ($warning->getYear() === $this) {
$warning->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Retained>
*/
public function getRetaineds(): Collection
{
return $this->retaineds;
}
public function addRetained(Retained $retained): static
{
if (!$this->retaineds->contains($retained)) {
$this->retaineds->add($retained);
$retained->setYear($this);
}
return $this;
}
public function removeRetained(Retained $retained): static
{
if ($this->retaineds->removeElement($retained)) {
// set the owning side to null (unless already changed)
if ($retained->getYear() === $this) {
$retained->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, HonnorTableLimitMoy>
*/
public function getHonnorTableLimitMoys(): Collection
{
return $this->honnorTableLimitMoys;
}
public function addHonnorTableLimitMoy(HonnorTableLimitMoy $honnorTableLimitMoy): static
{
if (!$this->honnorTableLimitMoys->contains($honnorTableLimitMoy)) {
$this->honnorTableLimitMoys->add($honnorTableLimitMoy);
$honnorTableLimitMoy->setYear($this);
}
return $this;
}
public function removeHonnorTableLimitMoy(HonnorTableLimitMoy $honnorTableLimitMoy): static
{
if ($this->honnorTableLimitMoys->removeElement($honnorTableLimitMoy)) {
// set the owning side to null (unless already changed)
if ($honnorTableLimitMoy->getYear() === $this) {
$honnorTableLimitMoy->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, News>
*/
public function getNews(): Collection
{
return $this->news;
}
public function addNews(News $news): static
{
if (!$this->news->contains($news)) {
$this->news->add($news);
$news->setYear($this);
}
return $this;
}
public function removeNews(News $news): static
{
if ($this->news->removeElement($news)) {
// set the owning side to null (unless already changed)
if ($news->getYear() === $this) {
$news->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Event>
*/
public function getEvents(): Collection
{
return $this->events;
}
public function addEvent(Event $event): static
{
if (!$this->events->contains($event)) {
$this->events->add($event);
$event->setYear($this);
}
return $this;
}
public function removeEvent(Event $event): static
{
if ($this->events->removeElement($event)) {
// set the owning side to null (unless already changed)
if ($event->getYear() === $this) {
$event->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AdmissionLimit>
*/
public function getAdmissionLimits(): Collection
{
return $this->admissionLimits;
}
public function addAdmissionLimit(AdmissionLimit $admissionLimit): static
{
if (!$this->admissionLimits->contains($admissionLimit)) {
$this->admissionLimits->add($admissionLimit);
$admissionLimit->setYear($this);
}
return $this;
}
public function removeAdmissionLimit(AdmissionLimit $admissionLimit): static
{
if ($this->admissionLimits->removeElement($admissionLimit)) {
// set the owning side to null (unless already changed)
if ($admissionLimit->getYear() === $this) {
$admissionLimit->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AgendaDay>
*/
public function getAgendaDays(): Collection
{
return $this->agendaDays;
}
public function addAgendaDay(AgendaDay $agendaDay): static
{
if (!$this->agendaDays->contains($agendaDay)) {
$this->agendaDays->add($agendaDay);
$agendaDay->setYear($this);
}
return $this;
}
public function removeAgendaDay(AgendaDay $agendaDay): static
{
if ($this->agendaDays->removeElement($agendaDay)) {
// set the owning side to null (unless already changed)
if ($agendaDay->getYear() === $this) {
$agendaDay->setYear(null);
}
}
return $this;
}
public function getAgendaTimeConvertion(): ?AgendaTimeConvertion
{
return $this->agendaTimeConvertion;
}
public function setAgendaTimeConvertion(AgendaTimeConvertion $agendaTimeConvertion): static
{
// set the owning side of the relation if necessary
if ($agendaTimeConvertion->getYear() !== $this) {
$agendaTimeConvertion->setYear($this);
}
$this->agendaTimeConvertion = $agendaTimeConvertion;
return $this;
}
/**
* @return Collection<int, ExamWeek>
*/
public function getExamWeeks(): Collection
{
return $this->examWeeks;
}
public function addExamWeek(ExamWeek $examWeek): static
{
if (!$this->examWeeks->contains($examWeek)) {
$this->examWeeks->add($examWeek);
$examWeek->setYear($this);
}
return $this;
}
public function removeExamWeek(ExamWeek $examWeek): static
{
if ($this->examWeeks->removeElement($examWeek)) {
// set the owning side to null (unless already changed)
if ($examWeek->getYear() === $this) {
$examWeek->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, Competence>
*/
public function getCompetences(): Collection
{
return $this->competences;
}
public function addCompetence(Competence $competence): static
{
if (!$this->competences->contains($competence)) {
$this->competences->add($competence);
$competence->setYear($this);
}
return $this;
}
public function removeCompetence(Competence $competence): static
{
if ($this->competences->removeElement($competence)) {
// set the owning side to null (unless already changed)
if ($competence->getYear() === $this) {
$competence->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, WeekSubjectGoal>
*/
public function getWeekSubjectGoals(): Collection
{
return $this->weekSubjectGoals;
}
public function addWeekSubjectGoal(WeekSubjectGoal $weekSubjectGoal): static
{
if (!$this->weekSubjectGoals->contains($weekSubjectGoal)) {
$this->weekSubjectGoals->add($weekSubjectGoal);
$weekSubjectGoal->setYear($this);
}
return $this;
}
public function removeWeekSubjectGoal(WeekSubjectGoal $weekSubjectGoal): static
{
if ($this->weekSubjectGoals->removeElement($weekSubjectGoal)) {
// set the owning side to null (unless already changed)
if ($weekSubjectGoal->getYear() === $this) {
$weekSubjectGoal->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, ProfSchoolPlanner>
*/
public function getProfSchoolPlanners(): Collection
{
return $this->profSchoolPlanners;
}
public function addProfSchoolPlanner(ProfSchoolPlanner $profSchoolPlanner): static
{
if (!$this->profSchoolPlanners->contains($profSchoolPlanner)) {
$this->profSchoolPlanners->add($profSchoolPlanner);
$profSchoolPlanner->setYear($this);
}
return $this;
}
public function removeProfSchoolPlanner(ProfSchoolPlanner $profSchoolPlanner): static
{
if ($this->profSchoolPlanners->removeElement($profSchoolPlanner)) {
// set the owning side to null (unless already changed)
if ($profSchoolPlanner->getYear() === $this) {
$profSchoolPlanner->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, ProfTime>
*/
public function getProfTimes(): Collection
{
return $this->profTimes;
}
public function addProfTime(ProfTime $profTime): static
{
if (!$this->profTimes->contains($profTime)) {
$this->profTimes->add($profTime);
$profTime->setYear($this);
}
return $this;
}
public function removeProfTime(ProfTime $profTime): static
{
if ($this->profTimes->removeElement($profTime)) {
// set the owning side to null (unless already changed)
if ($profTime->getYear() === $this) {
$profTime->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, SchoolPlannerType>
*/
public function getSchoolPlannerTypes(): Collection
{
return $this->schoolPlannerTypes;
}
public function addSchoolPlannerType(SchoolPlannerType $schoolPlannerType): static
{
if (!$this->schoolPlannerTypes->contains($schoolPlannerType)) {
$this->schoolPlannerTypes->add($schoolPlannerType);
$schoolPlannerType->setYear($this);
}
return $this;
}
public function removeSchoolPlannerType(SchoolPlannerType $schoolPlannerType): static
{
if ($this->schoolPlannerTypes->removeElement($schoolPlannerType)) {
// set the owning side to null (unless already changed)
if ($schoolPlannerType->getYear() === $this) {
$schoolPlannerType->setYear(null);
}
}
return $this;
}
/**
* @return Collection<int, AgendaElement>
*/
public function getAgendaElements(): Collection
{
return $this->agendaElements;
}
public function addAgendaElement(AgendaElement $agendaElement): static
{
if (!$this->agendaElements->contains($agendaElement)) {
$this->agendaElements->add($agendaElement);
$agendaElement->setYear($this);
}
return $this;
}
public function removeAgendaElement(AgendaElement $agendaElement): static
{
if ($this->agendaElements->removeElement($agendaElement)) {
// set the owning side to null (unless already changed)
if ($agendaElement->getYear() === $this) {
$agendaElement->setYear(null);
}
}
return $this;
}
}