<?php
namespace App\Entity;
use App\Repository\TheClassRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Groups;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use App\Entity\Traits\Timestampable;
#[ORM\HasLifecycleCallbacks]
#[ORM\Entity(repositoryClass: TheClassRepository::class)]
class TheClass
{
use Timestampable;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Groups(['homework','note','getStudents','getSubject','getClass','getDiscussionClass','getExamStudent','getStatsStudentParentIndex'])]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Groups(['homework','getLate','note','getStudents','getClass','getDiscussionClass','getDiscussion','getExamStudent','getAbsence','getPunish','getStatsStudentParentIndex'])]
private ?string $name = null;
#[ORM\ManyToOne(cascade: ["persist"], inversedBy: 'theClasses')]
#[ORM\JoinColumn(nullable: false)]
private ?SchoolSection $section = null;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: StudentYear::class)]
private Collection $studentsYears;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Subject::class)]
private Collection $subjects;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: HomeWork::class)]
private Collection $homeWorks;
#[ORM\Column(nullable: true)]
private ?bool $active = null;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Note::class)]
private Collection $notes;
#[ORM\ManyToMany(targetEntity: UserYear::class, mappedBy: 'classes')]
private Collection $userYears;
#[ORM\ManyToMany(targetEntity: DocInfo::class, mappedBy: 'classes', cascade: ['persist', 'remove'])]
private Collection $docInfos;
#[ORM\ManyToOne(cascade: ["persist"], inversedBy: 'theClasses')]
private ?User $author = null;
#[ORM\ManyToOne(cascade: ["persist"], inversedBy: 'theClassesEdited')]
private ?User $editor = null;
#[ORM\ManyToOne(cascade: ["persist"], inversedBy: 'theClasses')]
#[Groups(['getClass'])]
private ?School $school = null;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: DiscussionClass::class)]
private Collection $discussionClasses;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: SubjectGroup::class, orphanRemoval: true)]
private Collection $subjectGroups;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Scolarity::class, orphanRemoval: true)]
private Collection $scolarities;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: ExamAgenda::class)]
private Collection $examAgendas;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: SubSequence::class, orphanRemoval: true)]
private Collection $subSequences;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Quarter::class, orphanRemoval: true)]
private Collection $quarters;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: SubNote::class, orphanRemoval: true)]
private Collection $subNotes;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Punish::class)]
private Collection $punishes;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: DisciplineWarning::class)]
private Collection $disciplineWarnings;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: DisciplineBlame::class)]
private Collection $disciplineBlames;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: DisciplineExclusion::class)]
private Collection $disciplineExclusions;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: ParentNote::class)]
private Collection $parentNotes;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Absence::class)]
private Collection $absences;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: DisciplineRetained::class)]
private Collection $disciplineRetaineds;
#[ORM\ManyToOne(inversedBy: 'theClassesTeached')]
private ?User $prof = null;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: PrimaryParentNote::class)]
private Collection $primaryParentNotes;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: PrimaryNote::class)]
private Collection $primaryNotes;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: DisciplinePunish::class)]
private Collection $disciplinePunishes;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Late::class)]
private Collection $lates;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Blame::class)]
private Collection $blames;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Warning::class)]
private Collection $warnings;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Retained::class)]
private Collection $retaineds;
#[ORM\Column(length: 255, nullable: true)]
private ?string $slug = null;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: DisciplineConcile::class)]
private Collection $disciplineConciles;
#[ORM\ManyToOne(inversedBy: 'principalClasses')]
private ?UserYear $principalProf = null;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: AgendaDay::class)]
private Collection $agendaDays;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: Competence::class)]
private Collection $competences;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: WeekSubjectGoal::class)]
private Collection $weekSubjectGoals;
#[ORM\OneToMany(mappedBy: 'classe', targetEntity: AgendaElement::class)]
private Collection $agendaElements;
public function __toString(): string
{
return $this->name;
}
public function __construct()
{
$this->subjects = new ArrayCollection();
$this->studentsYears = new ArrayCollection();
$this->homeWorks = new ArrayCollection();
$this->notes = new ArrayCollection();
$this->userYears = new ArrayCollection();
$this->docInfos = new ArrayCollection();
$this->discussionClasses = new ArrayCollection();
$this->subjectGroups = new ArrayCollection();
$this->scolarities = new ArrayCollection();
$this->subSequences = new ArrayCollection();
$this->quarters = new ArrayCollection();
$this->subNotes = new ArrayCollection();
$this->disciplineWarnings = new ArrayCollection();
$this->disciplineBlames = new ArrayCollection();
$this->disciplineExclusions = new ArrayCollection();
$this->parentNotes = new ArrayCollection();
$this->absences = new ArrayCollection();
$this->disciplineRetaineds = new ArrayCollection();
$this->primaryParentNotes = new ArrayCollection();
$this->primaryNotes = new ArrayCollection();
$this->punishes = new ArrayCollection();
$this->disciplinePunishes = new ArrayCollection();
$this->lates = new ArrayCollection();
$this->blames = new ArrayCollection();
$this->warnings = new ArrayCollection();
$this->retaineds = new ArrayCollection();
$this->disciplineConciles = new ArrayCollection();
$this->agendaDays = new ArrayCollection();
$this->competences = new ArrayCollection();
$this->weekSubjectGoals = 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 getSection(): ?SchoolSection
{
return $this->section;
}
public function setSection(?SchoolSection $section): static
{
$this->section = $section;
return $this;
}
/**
* @return Collection<int, StudentYear>
*/
public function getStudentsYears(): Collection
{
return $this->studentsYears;
}
public function addStudentsYear(StudentYear $studentsYear): static
{
if (!$this->studentsYears->contains($studentsYear)) {
$this->studentsYears->add($studentsYear);
$studentsYear->setClasse($this);
}
return $this;
}
public function removeStudentsYear(StudentYear $studentsYear): static
{
if ($this->studentsYears->removeElement($studentsYear)) {
// set the owning side to null (unless already changed)
if ($studentsYear->getClasse() === $this) {
$studentsYear->setClasse(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->setClasse($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->getClasse() === $this) {
$subject->setClasse(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->setClasse($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->getClasse() === $this) {
$homeWork->setClasse(null);
}
}
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): static
{
$this->active = $active;
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->setClasse($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->getClasse() === $this) {
$note->setClasse(null);
}
}
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->addClass($this);
}
return $this;
}
public function removeUserYear(UserYear $userYear): static
{
if ($this->userYears->removeElement($userYear)) {
$userYear->removeClass($this);
}
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->addClass($this);
}
return $this;
}
public function removeDocInfo(DocInfo $docInfo): static
{
if ($this->docInfos->removeElement($docInfo)) {
$docInfo->removeClass($this);
}
return $this;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): static
{
$this->author = $author;
return $this;
}
public function getEditor(): ?User
{
return $this->editor;
}
public function setEditor(?User $editor): static
{
$this->editor = $editor;
return $this;
}
public function getSchool(): ?School
{
return $this->school;
}
public function setSchool(?School $school): static
{
$this->school = $school;
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->setClasse($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->getClasse() === $this) {
$discussionClass->setClasse(null);
}
}
return $this;
}
/**
* @return Collection<int, SubjectGroup>
*/
public function getSubjectGroups(): Collection
{
return $this->subjectGroups;
}
public function addSubjectGroup(SubjectGroup $subjectGroup): static
{
if (!$this->subjectGroups->contains($subjectGroup)) {
$this->subjectGroups->add($subjectGroup);
$subjectGroup->setClasse($this);
}
return $this;
}
public function removeSubjectGroup(SubjectGroup $subjectGroup): static
{
if ($this->subjectGroups->removeElement($subjectGroup)) {
// set the owning side to null (unless already changed)
if ($subjectGroup->getClasse() === $this) {
$subjectGroup->setClasse(null);
}
}
return $this;
}
/**
* @return Collection<int, Scolarity>
*/
public function getScolarities(): Collection
{
return $this->scolarities;
}
public function addScolarity(Scolarity $scolarity): static
{
if (!$this->scolarities->contains($scolarity)) {
$this->scolarities->add($scolarity);
$scolarity->setClasse($this);
}
return $this;
}
public function removeScolarity(Scolarity $scolarity): static
{
if ($this->scolarities->removeElement($scolarity)) {
// set the owning side to null (unless already changed)
if ($scolarity->getClasse() === $this) {
$scolarity->setClasse(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->setClasse($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->getClasse() === $this) {
$examAgenda->setClasse(null);
}
}
return $this;
}
/**
* @return Collection<int, SubSequence>
*/
public function getSubSequences(): Collection
{
return $this->subSequences;
}
public function addSubSequence(SubSequence $subSequence): static
{
if (!$this->subSequences->contains($subSequence)) {
$this->subSequences->add($subSequence);
$subSequence->setClasse($this);
}
return $this;
}
public function removeSubSequence(SubSequence $subSequence): static
{
if ($this->subSequences->removeElement($subSequence)) {
// set the owning side to null (unless already changed)
if ($subSequence->getClasse() === $this) {
$subSequence->setClasse(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->setClasse($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->getClasse() === $this) {
$quarter->setClasse(null);
}
}
return $this;
}
/**
* @return Collection<int, SubNote>
*/
public function getSubNotes(): Collection
{
return $this->subNotes;
}
public function addSubNote(SubNote $subNote): static
{
if (!$this->subNotes->contains($subNote)) {
$this->subNotes->add($subNote);
$subNote->setClasse($this);
}
return $this;
}
public function removeSubNote(SubNote $subNote): static
{
if ($this->subNotes->removeElement($subNote)) {
// set the owning side to null (unless already changed)
if ($subNote->getClasse() === $this) {
$subNote->setClasse(null);
}
}
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->setClass($this);
}
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->setClasse($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->getClass() === $this) {
$punish->setClass(null);
}
return $this;
}
}
public function removeDisciplineWarning(DisciplineWarning $disciplineWarning): static
{
if ($this->disciplineWarnings->removeElement($disciplineWarning)) {
// set the owning side to null (unless already changed)
if ($disciplineWarning->getClasse() === $this) {
$disciplineWarning->setClasse(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->setClasse($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->getClasse() === $this) {
$disciplineBlame->setClasse(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->setClasse($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->getClasse() === $this) {
$disciplineExclusion->setClasse(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->setClasse($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->getClasse() === $this) {
$parentNote->setClasse(null);
}
}
return $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->setClasse($this);
}
return $this;
}
public function removeAbsence(Absence $absence): static
{
if ($this->absences->removeElement($absence)) {
// set the owning side to null (unless already changed)
if ($absence->getClasse() === $this) {
$absence->setClasse(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->setClasse($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->getClasse() === $this) {
$disciplineRetained->setClasse(null);
}
}
return $this;
}
public function getProf(): ?User
{
return $this->prof;
}
public function setProf(?User $prof): static
{
$this->prof = $prof;
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->setClasse($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->getClasse() === $this) {
$primaryParentNote->setClasse(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->setClasse($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->getClasse() === $this) {
$primaryNote->setClasse(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->setClasse($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->getClasse() === $this) {
$disciplinePunish->setClasse(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->setClasse($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->getClasse() === $this) {
$late->setClasse(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->setClasse($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->getClasse() === $this) {
$blame->setClasse(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->setClasse($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->getClasse() === $this) {
$warning->setClasse(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->setClasse($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->getClasse() === $this) {
$retained->setClasse(null);
}
}
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): static
{
$this->slug = $slug;
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->setClasse($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->getClasse() === $this) {
$disciplineConcile->setClasse(null);
}
}
return $this;
}
public function getPrincipalProf(): ?UserYear
{
return $this->principalProf;
}
public function setPrincipalProf(?UserYear $principalProf): static
{
$this->principalProf = $principalProf;
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->setClasse($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->getClasse() === $this) {
$agendaDay->setClasse(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->setClasse($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->getClasse() === $this) {
$competence->setClasse(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->setClasse($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->getClasse() === $this) {
$weekSubjectGoal->setClasse(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->setClasse($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->getClasse() === $this) {
$agendaElement->setClasse(null);
}
}
return $this;
}
}