<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use App\Entity\Traits\Timestampable;
use JMS\Serializer\Annotation\Groups;
#[ORM\HasLifecycleCallbacks]
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ORM\Table(name: '`user`')]
#[UniqueEntity(fields: ['phone'], message: 'There is already an account with this email')]
class User implements UserInterface, PasswordAuthenticatedUserInterface
{
use Timestampable;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Groups(['chatWebNew', 'chatView', 'chatAllList', 'singleMessage','getDiscussion','getStudents','getSubject','getAppUsers', 'getDiscussionMessage','getDiscussionClassMessage'])]
private ?int $id = null;
#[ORM\Column(length: 180, nullable: true)]
#[Groups(["getAppUsers"])]
private ?string $email = null;
#[ORM\Column]
private array $roles = [];
/**
* @var string The hashed password
*/
#[ORM\Column]
private ?string $password = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(['chatWebNew', 'chatAllList','getDiscussion','getAppUsers', 'getDiscussionMessage','getDiscussionClassMessage'])]
private ?string $firstName = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(['chatWebNew', 'chatAllList','getDiscussion','getAppUsers', 'getDiscussionMessage', 'getDiscussionClassMessage'])]
private ?string $lastName = null;
#[ORM\Column(length: 255)]
#[Groups(['getAppUsers'])]
private ?string $phone = null;
#[ORM\Column(length: 255)]
#[Groups(['chatWebNew','getDiscussion','getAppUsers', 'getDiscussionMessage', 'getDiscussionClassMessage'])]
private ?string $userType = null;
#[ORM\Column(type: 'boolean')]
private $isVerified = false;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: News::class)]
private Collection $news;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Event::class)]
private Collection $events;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserYear::class)]
private Collection $userYears;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(['getAppUsers'])]
private ?string $matricule = null;
#[ORM\OneToMany(mappedBy: 'prof', targetEntity: Subject::class)]
private Collection $subjects;
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: Student::class)]
private Collection $students;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: HomeWork::class)]
private Collection $homeWorks;
#[ORM\OneToMany(mappedBy: 'initiator', targetEntity: Chat::class)]
private Collection $chats;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Message::class)]
private Collection $messages;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: DocInfo::class)]
private Collection $docInfos;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: DocInfo::class)]
private Collection $docInfoUpdated;
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: DocInfo::class)]
private Collection $parentDocInfos;
#[ORM\OneToMany(mappedBy: 'userA', targetEntity: Discussion::class)]
private Collection $discussions;
#[ORM\OneToMany(mappedBy: 'messageBy', targetEntity: DiscussionMessage::class)]
private Collection $discussionMessages;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Notifications::class)]
private Collection $notifications;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fullName = null;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Absence::class)]
private Collection $absences;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: Absence::class)]
private Collection $absencesEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: CategoryEvent::class)]
private Collection $categoryEvents;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: CategoryEvent::class)]
private Collection $categoryEventsEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: ClassYear::class)]
private Collection $classYears;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: ClassYear::class)]
private Collection $ClassYearsEdited;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: Event::class)]
private Collection $eventsEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Exams::class)]
private Collection $exams;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: Exams::class)]
private Collection $examsEdited;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: HomeWork::class)]
private Collection $homeworksEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Late::class)]
private Collection $lates;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: Late::class)]
private Collection $latesEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: NewsCategory::class)]
private Collection $newsCategories;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: NewsCategory::class)]
private Collection $newsCategoriesEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Note::class)]
private Collection $notes;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: Note::class)]
private Collection $notesEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: SchoolSection::class)]
private Collection $schoolSections;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: SchoolSection::class)]
private Collection $schoolSectionsEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: SchoolYear::class)]
private Collection $schoolYears;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: SchoolYear::class)]
private Collection $schoolYearsEdited;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: Student::class)]
private Collection $studentsEdited;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: Subject::class)]
private Collection $subjectsEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: SubjectGroup::class)]
private Collection $subjectGroups;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: SubjectGroup::class)]
private Collection $subjectGroupsEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: TheClass::class)]
private Collection $theClasses;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: TheClass::class)]
private Collection $theClassesEdited;
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'users', cascade: ["persist"])]
private ?self $author = null;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: self::class)]
private Collection $users;
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'usersEdited', cascade: ["persist"])]
private ?self $editor = null;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: self::class)]
private Collection $usersEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Student::class)]
private Collection $studentsCreated;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Subject::class)]
private Collection $subjectsCreated;
#[ORM\OneToMany(mappedBy: 'editor', targetEntity: News::class)]
private Collection $newsEdited;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Punish::class)]
private Collection $punishes;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: PunishCategory::class)]
private Collection $punishCategories;
#[Groups(['getDiscussion'])]
#[ORM\Column(type: Types::BIGINT, nullable: true)]
private ?string $lastRequestTs = null;
#[ORM\ManyToOne(inversedBy: 'users', cascade: ["persist"])]
private ?School $school = null;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: DiscussionClassMessage::class)]
private Collection $discussionClassMessages;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Agenda::class)]
private Collection $agendas;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: ExamAgenda::class)]
private Collection $examAgendas;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: SubSequence::class)]
private Collection $subSequences;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Quarter::class)]
private Collection $quarters;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: SubNote::class)]
private Collection $subNotes;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AgendaDay::class)]
private Collection $agendaDays;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AgendaElement::class)]
private Collection $agendaElements;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: ExamAgendaDay::class)]
private Collection $examAgendaDays;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: ExamAgendaElement::class)]
private Collection $examAgendaElements;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Appreciation::class)]
private Collection $appreciations;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: LocalAccount::class)]
private Collection $localAccounts;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: NewsBookmark::class)]
private Collection $newsBookmarks;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: HomeworkBookmark::class)]
private Collection $homeworkBookmarks;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: ScolarityHistory::class)]
private Collection $scolarityHistories;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: ScolarityHistoryEdition::class)]
private Collection $scolarityHistoryEditions;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: JustifyAbsence::class)]
private Collection $justifyAbsences;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: VerbalProcess::class)]
private Collection $verbalProcesses;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AbsenceDisciplineConcileConfig::class)]
private Collection $absenceDisciplineConcileConfigs;
#[ORM\OneToMany(mappedBy: 'prof', targetEntity: TheClass::class)]
private Collection $theClassesTeached;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: PrimaryNote::class)]
private Collection $primaryNotes;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: VerbalProcessCategory::class)]
private Collection $verbalProcessCategories;
#[ORM\Column(length: 255, nullable: true)]
private ?string $theme = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $picture = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $sexe = null;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserAndroidToken::class)]
private Collection $userAndroidTokens;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserIphoneToken::class)]
private Collection $userIphoneTokens;
#[ORM\Column(length: 255, nullable: true)]
private ?string $localPhoneLang = null;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AbsenceBlameConfig::class)]
private Collection $absenceBlameConfigs;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AbsenceWarningConfig::class)]
private Collection $absenceWarningConfigs;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AbsencePunishConfig::class)]
private Collection $absencePunishConfigs;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AbsenceExclusionConfig::class)]
private Collection $absenceExclusionConfigs;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: GlobalDisciplineEnabledConfig::class)]
private Collection $globalDisciplineEnabledConfigs;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AbsenceRetainedConfig::class)]
private Collection $absenceRetainedConfigs;
#[ORM\Column(length: 255, nullable: true)]
private ?string $userToken = null;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: DisciplineConcile::class)]
private Collection $disciplineConciles;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: RefreshToken::class, orphanRemoval: true)]
private Collection $refreshTokens;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserNotification::class)]
private Collection $userNotifications;
#[ORM\ManyToMany(targetEntity: DiscussionClassMessage::class, mappedBy: 'readers')]
private Collection $discussionClassMessagesRead;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: AgendaTimeConvertion::class)]
private Collection $agendaTimeConvertions;
#[ORM\OneToMany(mappedBy: 'author', targetEntity: Competence::class)]
private Collection $competences;
#[ORM\OneToMany(mappedBy: 'prof', targetEntity: ProfTime::class)]
private Collection $profTimes;
public function __toString(): string
{
return $this->getFullName();
}
public function __construct()
{
$this->news = new ArrayCollection();
$this->events = new ArrayCollection();
$this->userYears = new ArrayCollection();
$this->subjects = new ArrayCollection();
$this->students = new ArrayCollection();
$this->homeWorks = new ArrayCollection();
$this->chats = new ArrayCollection();
$this->messages = new ArrayCollection();
$this->docInfos = new ArrayCollection();
$this->docInfoUpdated = new ArrayCollection();
$this->parentDocInfos = new ArrayCollection();
$this->discussions = new ArrayCollection();
$this->discussionMessages = new ArrayCollection();
$this->notifications = new ArrayCollection();
$this->absences = new ArrayCollection();
$this->absencesEdited = new ArrayCollection();
$this->categoryEvents = new ArrayCollection();
$this->categoryEventsEdited = new ArrayCollection();
$this->classYears = new ArrayCollection();
$this->ClassYearsEdited = new ArrayCollection();
$this->eventsEdited = new ArrayCollection();
$this->exams = new ArrayCollection();
$this->examsEdited = new ArrayCollection();
$this->homeworksEdited = new ArrayCollection();
$this->lates = new ArrayCollection();
$this->latesEdited = new ArrayCollection();
$this->newsCategories = new ArrayCollection();
$this->newsCategoriesEdited = new ArrayCollection();
$this->notes = new ArrayCollection();
$this->notesEdited = new ArrayCollection();
$this->schoolSections = new ArrayCollection();
$this->schoolSectionsEdited = new ArrayCollection();
$this->schoolYears = new ArrayCollection();
$this->schoolYearsEdited = new ArrayCollection();
$this->studentsEdited = new ArrayCollection();
$this->subjectsEdited = new ArrayCollection();
$this->subjectGroups = new ArrayCollection();
$this->subjectGroupsEdited = new ArrayCollection();
$this->theClasses = new ArrayCollection();
$this->theClassesEdited = new ArrayCollection();
$this->users = new ArrayCollection();
$this->usersEdited = new ArrayCollection();
$this->studentsCreated = new ArrayCollection();
$this->subjectsCreated = new ArrayCollection();
$this->newsEdited = new ArrayCollection();
$this->punishes = new ArrayCollection();
$this->punishCategories = new ArrayCollection();
$this->discussionClassMessages = new ArrayCollection();
$this->agendas = new ArrayCollection();
$this->examAgendas = new ArrayCollection();
$this->subSequences = new ArrayCollection();
$this->quarters = new ArrayCollection();
$this->subNotes = new ArrayCollection();
$this->agendaDays = new ArrayCollection();
$this->agendaElements = new ArrayCollection();
$this->examAgendaDays = new ArrayCollection();
$this->examAgendaElements = new ArrayCollection();
$this->appreciations = new ArrayCollection();
$this->localAccounts = new ArrayCollection();
$this->scolarityHistories = new ArrayCollection();
$this->scolarityHistoryEditions = new ArrayCollection();
$this->justifyAbsences = new ArrayCollection();
$this->verbalProcesses = new ArrayCollection();
$this->absenceDisciplineConcileConfigs = new ArrayCollection();
$this->theClassesTeached = new ArrayCollection();
$this->primaryNotes = new ArrayCollection();
$this->verbalProcessCategories = new ArrayCollection();
$this->newsBookmarks = new ArrayCollection();
$this->homeworkBookmarks = new ArrayCollection();
$this->userAndroidTokens = new ArrayCollection();
$this->userIphoneTokens = new ArrayCollection();
$this->absenceBlameConfigs = new ArrayCollection();
$this->absenceWarningConfigs = new ArrayCollection();
$this->absencePunishConfigs = new ArrayCollection();
$this->absenceExclusionConfigs = new ArrayCollection();
$this->globalDisciplineEnabledConfigs = new ArrayCollection();
$this->absenceRetainedConfigs = new ArrayCollection();
$this->disciplineConciles = new ArrayCollection();
$this->refreshTokens = new ArrayCollection();
$this->userNotifications = new ArrayCollection();
$this->discussionClassMessagesRead = new ArrayCollection();
$this->agendaTimeConvertions = new ArrayCollection();
$this->competences = new ArrayCollection();
$this->profTimes = new ArrayCollection();
}
public function getFullName():string
{
return $this->getLastName()." ".$this->getFirstName();
}
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): static
{
$this->email = $email;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUserIdentifier(): string
{
return (string) $this->email;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
public function setRoles(array $roles): static
{
$this->roles = $roles;
return $this;
}
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): string
{
return $this->password;
}
public function setPassword(string $password): static
{
$this->password = $password;
return $this;
}
/**
* @see UserInterface
*/
public function eraseCredentials(): void
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(string $firstName): static
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(string $lastName): static
{
$this->lastName = $lastName;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): static
{
$this->phone = $phone;
return $this;
}
public function getUserType(): ?string
{
return $this->userType;
}
public function setUserType(string $userType): static
{
$this->userType = $userType;
return $this;
}
public function isVerified(): bool
{
return $this->isVerified;
}
public function setIsVerified(bool $isVerified): static
{
$this->isVerified = $isVerified;
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->setAuthor($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->getAuthor() === $this) {
$news->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$event->setAuthor(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->setUser($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->getUser() === $this) {
$userYear->setUser(null);
}
}
return $this;
}
public function getMatricule(): ?string
{
return $this->matricule;
}
public function setMatricule(?string $matricule): static
{
$this->matricule = $matricule;
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->setProf($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->getProf() === $this) {
$subject->setProf(null);
}
}
return $this;
}
/**
* @return Collection<int, Student>
*/
public function getStudents(): Collection
{
return $this->students;
}
public function addStudent(Student $student): static
{
if (!$this->students->contains($student)) {
$this->students->add($student);
$student->setParent($this);
}
return $this;
}
public function removeStudent(Student $student): static
{
if ($this->students->removeElement($student)) {
// set the owning side to null (unless already changed)
if ($student->getParent() === $this) {
$student->setParent(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->setAuthor($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->getAuthor() === $this) {
$homeWork->setAuthor(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->setInitiator($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->getInitiator() === $this) {
$chat->setInitiator(null);
}
}
return $this;
}
/**
* @return Collection<int, Message>
*/
public function getMessages(): Collection
{
return $this->messages;
}
public function addMessage(Message $message): static
{
if (!$this->messages->contains($message)) {
$this->messages->add($message);
$message->setAuthor($this);
}
return $this;
}
public function removeMessage(Message $message): static
{
if ($this->messages->removeElement($message)) {
// set the owning side to null (unless already changed)
if ($message->getAuthor() === $this) {
$message->setAuthor(null);
}
}
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->setUserA($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->getUserA() === $this) {
$discussion->setUserA(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->setAuthor($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->getAuthor() === $this) {
$docInfo->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, DocInfo>
*/
public function getDocInfoUpdated(): Collection
{
return $this->docInfoUpdated;
}
public function addDocInfoUpdated(DocInfo $docInfoUpdated): static
{
if (!$this->docInfoUpdated->contains($docInfoUpdated)) {
$this->docInfoUpdated->add($docInfoUpdated);
$docInfoUpdated->setEditor($this);
}
return $this;
}
public function removeDocInfoUpdated(DocInfo $docInfoUpdated): static
{
if ($this->docInfoUpdated->removeElement($docInfoUpdated)) {
// set the owning side to null (unless already changed)
if ($docInfoUpdated->getEditor() === $this) {
$docInfoUpdated->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, DocInfo>
*/
public function getParentDocInfos(): Collection
{
return $this->parentDocInfos;
}
public function addParentDocInfo(DocInfo $parentDocInfo): static
{
if (!$this->parentDocInfos->contains($parentDocInfo)) {
$this->parentDocInfos->add($parentDocInfo);
$parentDocInfo->setParent($this);
}
return $this;
}
public function removeParentDocInfo(DocInfo $parentDocInfo): static
{
if ($this->parentDocInfos->removeElement($parentDocInfo)) {
// set the owning side to null (unless already changed)
if ($parentDocInfo->getParent() === $this) {
$parentDocInfo->setParent(null);
}
}
return $this;
}
/* @return Collection<int, DiscussionMessage>
*/
public function getDiscussionMessages(): Collection
{
return $this->discussionMessages;
}
public function addDiscussionMessage(DiscussionMessage $discussionMessage): static
{
if (!$this->discussionMessages->contains($discussionMessage)) {
$this->discussionMessages->add($discussionMessage);
$discussionMessage->setMessageBy($this);
}
return $this;
}
public function removeDiscussionMessage(DiscussionMessage $discussionMessage): static
{
if ($this->discussionMessages->removeElement($discussionMessage)) {
// set the owning side to null (unless already changed)
if ($discussionMessage->getMessageBy() === $this) {
$discussionMessage->setMessageBy(null);
}
}
return $this;
}
/* @return Collection<int, Notifications>
*/
public function getNotifications(): Collection
{
return $this->notifications;
}
public function addNotification(Notifications $notification): static
{
if (!$this->notifications->contains($notification)) {
$this->notifications->add($notification);
$notification->setUser($this);
}
return $this;
}
public function removeNotification(Notifications $notification): static
{
if ($this->notifications->removeElement($notification)) {
// set the owning side to null (unless already changed)
if ($notification->getUser() === $this) {
$notification->setUser(null);
}
}
return $this;
}
public function setFullName(?string $fullName): static
{
$this->fullName = $fullName;
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->setAuthor($this);
}
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->setAuthor($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->getAuthor() === $this) {
$punish->setAuthor(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->getAuthor() === $this) {
$absence->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, Absence>
*/
public function getAbsencesEdited(): Collection
{
return $this->absencesEdited;
}
public function addAbsencesEdited(Absence $absencesEdited): static
{
if (!$this->absencesEdited->contains($absencesEdited)) {
$this->absencesEdited->add($absencesEdited);
$absencesEdited->setEditor($this);
}
return $this;
}
public function removeAbsencesEdited(Absence $absencesEdited): static
{
if ($this->absencesEdited->removeElement($absencesEdited)) {
// set the owning side to null (unless already changed)
if ($absencesEdited->getEditor() === $this) {
$absencesEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, CategoryEvent>
*/
public function getCategoryEvents(): Collection
{
return $this->categoryEvents;
}
public function addCategoryEvent(CategoryEvent $categoryEvent): static
{
if (!$this->categoryEvents->contains($categoryEvent)) {
$this->categoryEvents->add($categoryEvent);
$categoryEvent->setAuthor($this);
}
return $this;
}
public function removeCategoryEvent(CategoryEvent $categoryEvent): static
{
if ($this->categoryEvents->removeElement($categoryEvent)) {
// set the owning side to null (unless already changed)
if ($categoryEvent->getAuthor() === $this) {
$categoryEvent->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, CategoryEvent>
*/
public function getCategoryEventsEdited(): Collection
{
return $this->categoryEventsEdited;
}
public function addCategoryEventsEdited(CategoryEvent $categoryEventsEdited): static
{
if (!$this->categoryEventsEdited->contains($categoryEventsEdited)) {
$this->categoryEventsEdited->add($categoryEventsEdited);
$categoryEventsEdited->setEditor($this);
}
return $this;
}
public function removeCategoryEventsEdited(CategoryEvent $categoryEventsEdited): static
{
if ($this->categoryEventsEdited->removeElement($categoryEventsEdited)) {
// set the owning side to null (unless already changed)
if ($categoryEventsEdited->getEditor() === $this) {
$categoryEventsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, ClassYear>
*/
public function getClassYears(): Collection
{
return $this->classYears;
}
public function addClassYear(ClassYear $classYear): static
{
if (!$this->classYears->contains($classYear)) {
$this->classYears->add($classYear);
$classYear->setAuthor($this);
}
return $this;
}
public function removeClassYear(ClassYear $classYear): static
{
if ($this->classYears->removeElement($classYear)) {
// set the owning side to null (unless already changed)
if ($classYear->getAuthor() === $this) {
$classYear->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, ClassYear>
*/
public function getClassYearsEdited(): Collection
{
return $this->ClassYearsEdited;
}
public function addClassYearsEdited(ClassYear $classYearsEdited): static
{
if (!$this->ClassYearsEdited->contains($classYearsEdited)) {
$this->ClassYearsEdited->add($classYearsEdited);
$classYearsEdited->setEditor($this);
}
return $this;
}
public function removeClassYearsEdited(ClassYear $classYearsEdited): static
{
if ($this->ClassYearsEdited->removeElement($classYearsEdited)) {
// set the owning side to null (unless already changed)
if ($classYearsEdited->getEditor() === $this) {
$classYearsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, Event>
*/
public function getEventsEdited(): Collection
{
return $this->eventsEdited;
}
public function addEventsEdited(Event $eventsEdited): static
{
if (!$this->eventsEdited->contains($eventsEdited)) {
$this->eventsEdited->add($eventsEdited);
$eventsEdited->setEditor($this);
}
return $this;
}
public function removeEventsEdited(Event $eventsEdited): static
{
if ($this->eventsEdited->removeElement($eventsEdited)) {
// set the owning side to null (unless already changed)
if ($eventsEdited->getEditor() === $this) {
$eventsEdited->setEditor(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->setAuthor($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->getAuthor() === $this) {
$exam->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, Exams>
*/
public function getExamsEdited(): Collection
{
return $this->examsEdited;
}
public function addExamsEdited(Exams $examsEdited): static
{
if (!$this->examsEdited->contains($examsEdited)) {
$this->examsEdited->add($examsEdited);
$examsEdited->setEditor($this);
}
return $this;
}
public function removeExamsEdited(Exams $examsEdited): static
{
if ($this->examsEdited->removeElement($examsEdited)) {
// set the owning side to null (unless already changed)
if ($examsEdited->getEditor() === $this) {
$examsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, HomeWork>
*/
public function getHomeworksEdited(): Collection
{
return $this->homeworksEdited;
}
public function addHomeworksEdited(HomeWork $homeworksEdited): static
{
if (!$this->homeworksEdited->contains($homeworksEdited)) {
$this->homeworksEdited->add($homeworksEdited);
$homeworksEdited->setEditor($this);
}
return $this;
}
public function removeHomeworksEdited(HomeWork $homeworksEdited): static
{
if ($this->homeworksEdited->removeElement($homeworksEdited)) {
// set the owning side to null (unless already changed)
if ($homeworksEdited->getEditor() === $this) {
$homeworksEdited->setEditor(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->setAuthor($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->getAuthor() === $this) {
$late->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, Late>
*/
public function getLatesEdited(): Collection
{
return $this->latesEdited;
}
public function addLatesEdited(Late $latesEdited): static
{
if (!$this->latesEdited->contains($latesEdited)) {
$this->latesEdited->add($latesEdited);
$latesEdited->setEditor($this);
}
return $this;
}
public function removeLatesEdited(Late $latesEdited): static
{
if ($this->latesEdited->removeElement($latesEdited)) {
// set the owning side to null (unless already changed)
if ($latesEdited->getEditor() === $this) {
$latesEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, NewsCategory>
*/
public function getNewsCategories(): Collection
{
return $this->newsCategories;
}
public function addNewsCategory(NewsCategory $newsCategory): static
{
if (!$this->newsCategories->contains($newsCategory)) {
$this->newsCategories->add($newsCategory);
$newsCategory->setAuthor($this);
}
return $this;
}
public function removeNewsCategory(NewsCategory $newsCategory): static
{
if ($this->newsCategories->removeElement($newsCategory)) {
// set the owning side to null (unless already changed)
if ($newsCategory->getAuthor() === $this) {
$newsCategory->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, NewsCategory>
*/
public function getNewsCategoriesEdited(): Collection
{
return $this->newsCategoriesEdited;
}
public function addNewsCategoriesEdited(NewsCategory $newsCategoriesEdited): static
{
if (!$this->newsCategoriesEdited->contains($newsCategoriesEdited)) {
$this->newsCategoriesEdited->add($newsCategoriesEdited);
$newsCategoriesEdited->setEditor($this);
}
return $this;
}
public function removeNewsCategoriesEdited(NewsCategory $newsCategoriesEdited): static
{
if ($this->newsCategoriesEdited->removeElement($newsCategoriesEdited)) {
// set the owning side to null (unless already changed)
if ($newsCategoriesEdited->getEditor() === $this) {
$newsCategoriesEdited->setEditor(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->setAuthor($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->getAuthor() === $this) {
$note->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, Note>
*/
public function getNotesEdited(): Collection
{
return $this->notesEdited;
}
public function addNotesEdited(Note $notesEdited): static
{
if (!$this->notesEdited->contains($notesEdited)) {
$this->notesEdited->add($notesEdited);
$notesEdited->setEditor($this);
}
return $this;
}
public function removeNotesEdited(Note $notesEdited): static
{
if ($this->notesEdited->removeElement($notesEdited)) {
// set the owning side to null (unless already changed)
if ($notesEdited->getEditor() === $this) {
$notesEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, SchoolSection>
*/
public function getSchoolSections(): Collection
{
return $this->schoolSections;
}
public function addSchoolSection(SchoolSection $schoolSection): static
{
if (!$this->schoolSections->contains($schoolSection)) {
$this->schoolSections->add($schoolSection);
$schoolSection->setAuthor($this);
}
return $this;
}
public function removeSchoolSection(SchoolSection $schoolSection): static
{
if ($this->schoolSections->removeElement($schoolSection)) {
// set the owning side to null (unless already changed)
if ($schoolSection->getAuthor() === $this) {
$schoolSection->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, SchoolSection>
*/
public function getSchoolSectionsEdited(): Collection
{
return $this->schoolSectionsEdited;
}
public function addSchoolSectionsEdited(SchoolSection $schoolSectionsEdited): static
{
if (!$this->schoolSectionsEdited->contains($schoolSectionsEdited)) {
$this->schoolSectionsEdited->add($schoolSectionsEdited);
$schoolSectionsEdited->setEditor($this);
}
return $this;
}
public function removeSchoolSectionsEdited(SchoolSection $schoolSectionsEdited): static
{
if ($this->schoolSectionsEdited->removeElement($schoolSectionsEdited)) {
// set the owning side to null (unless already changed)
if ($schoolSectionsEdited->getEditor() === $this) {
$schoolSectionsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, SchoolYear>
*/
public function getSchoolYears(): Collection
{
return $this->schoolYears;
}
public function addSchoolYear(SchoolYear $schoolYear): static
{
if (!$this->schoolYears->contains($schoolYear)) {
$this->schoolYears->add($schoolYear);
$schoolYear->setAuthor($this);
}
return $this;
}
public function removeSchoolYear(SchoolYear $schoolYear): static
{
if ($this->schoolYears->removeElement($schoolYear)) {
// set the owning side to null (unless already changed)
if ($schoolYear->getAuthor() === $this) {
$schoolYear->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, SchoolYear>
*/
public function getSchoolYearsEdited(): Collection
{
return $this->schoolYearsEdited;
}
public function addSchoolYearsEdited(SchoolYear $schoolYearsEdited): static
{
if (!$this->schoolYearsEdited->contains($schoolYearsEdited)) {
$this->schoolYearsEdited->add($schoolYearsEdited);
$schoolYearsEdited->setEditor($this);
}
return $this;
}
public function removeSchoolYearsEdited(SchoolYear $schoolYearsEdited): static
{
if ($this->schoolYearsEdited->removeElement($schoolYearsEdited)) {
// set the owning side to null (unless already changed)
if ($schoolYearsEdited->getEditor() === $this) {
$schoolYearsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, Student>
*/
public function getStudentsEdited(): Collection
{
return $this->studentsEdited;
}
public function addStudentsEdited(Student $studentsEdited): static
{
if (!$this->studentsEdited->contains($studentsEdited)) {
$this->studentsEdited->add($studentsEdited);
$studentsEdited->setEditor($this);
}
return $this;
}
public function removeStudentsEdited(Student $studentsEdited): static
{
if ($this->studentsEdited->removeElement($studentsEdited)) {
// set the owning side to null (unless already changed)
if ($studentsEdited->getEditor() === $this) {
$studentsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, Subject>
*/
public function getSubjectsEdited(): Collection
{
return $this->subjectsEdited;
}
public function addSubjectsEdited(Subject $subjectsEdited): static
{
if (!$this->subjectsEdited->contains($subjectsEdited)) {
$this->subjectsEdited->add($subjectsEdited);
$subjectsEdited->setEditor($this);
}
return $this;
}
public function removeSubjectsEdited(Subject $subjectsEdited): static
{
if ($this->subjectsEdited->removeElement($subjectsEdited)) {
// set the owning side to null (unless already changed)
if ($subjectsEdited->getEditor() === $this) {
$subjectsEdited->setEditor(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->setAuthor($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->getAuthor() === $this) {
$subjectGroup->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, SubjectGroup>
*/
public function getSubjectGroupsEdited(): Collection
{
return $this->subjectGroupsEdited;
}
public function addSubjectGroupsEdited(SubjectGroup $subjectGroupsEdited): static
{
if (!$this->subjectGroupsEdited->contains($subjectGroupsEdited)) {
$this->subjectGroupsEdited->add($subjectGroupsEdited);
$subjectGroupsEdited->setEditor($this);
}
return $this;
}
public function removeSubjectGroupsEdited(SubjectGroup $subjectGroupsEdited): static
{
if ($this->subjectGroupsEdited->removeElement($subjectGroupsEdited)) {
// set the owning side to null (unless already changed)
if ($subjectGroupsEdited->getEditor() === $this) {
$subjectGroupsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, TheClass>
*/
public function getTheClasses(): Collection
{
return $this->theClasses;
}
public function addTheClass(TheClass $theClass): static
{
if (!$this->theClasses->contains($theClass)) {
$this->theClasses->add($theClass);
$theClass->setAuthor($this);
}
return $this;
}
public function removeTheClass(TheClass $theClass): static
{
if ($this->theClasses->removeElement($theClass)) {
// set the owning side to null (unless already changed)
if ($theClass->getAuthor() === $this) {
$theClass->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, TheClass>
*/
public function getTheClassesEdited(): Collection
{
return $this->theClassesEdited;
}
public function addTheClassesEdited(TheClass $theClassesEdited): static
{
if (!$this->theClassesEdited->contains($theClassesEdited)) {
$this->theClassesEdited->add($theClassesEdited);
$theClassesEdited->setEditor($this);
}
return $this;
}
public function removeTheClassesEdited(TheClass $theClassesEdited): static
{
if ($this->theClassesEdited->removeElement($theClassesEdited)) {
// set the owning side to null (unless already changed)
if ($theClassesEdited->getEditor() === $this) {
$theClassesEdited->setEditor(null);
}
}
return $this;
}
public function getAuthor(): ?self
{
return $this->author;
}
public function setAuthor(?self $author): static
{
$this->author = $author;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(self $user): static
{
if (!$this->users->contains($user)) {
$this->users->add($user);
$user->setAuthor($this);
}
return $this;
}
public function removeUser(self $user): static
{
if ($this->users->removeElement($user)) {
// set the owning side to null (unless already changed)
if ($user->getAuthor() === $this) {
$user->setAuthor(null);
}
}
return $this;
}
public function getEditor(): ?self
{
return $this->editor;
}
public function setEditor(?self $editor): static
{
$this->editor = $editor;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getUsersEdited(): Collection
{
return $this->usersEdited;
}
public function addUsersEdited(self $usersEdited): static
{
if (!$this->usersEdited->contains($usersEdited)) {
$this->usersEdited->add($usersEdited);
$usersEdited->setEditor($this);
}
return $this;
}
public function removeUsersEdited(self $usersEdited): static
{
if ($this->usersEdited->removeElement($usersEdited)) {
// set the owning side to null (unless already changed)
if ($usersEdited->getEditor() === $this) {
$usersEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, Student>
*/
public function getStudentsCreated(): Collection
{
return $this->studentsCreated;
}
public function addStudentsCreated(Student $studentsCreated): static
{
if (!$this->studentsCreated->contains($studentsCreated)) {
$this->studentsCreated->add($studentsCreated);
$studentsCreated->setAuthor($this);
}
return $this;
}
public function removeStudentsCreated(Student $studentsCreated): static
{
if ($this->studentsCreated->removeElement($studentsCreated)) {
// set the owning side to null (unless already changed)
if ($studentsCreated->getAuthor() === $this) {
$studentsCreated->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, Subject>
*/
public function getSubjectsCreated(): Collection
{
return $this->subjectsCreated;
}
public function addSubjectsCreated(Subject $subjectsCreated): static
{
if (!$this->subjectsCreated->contains($subjectsCreated)) {
$this->subjectsCreated->add($subjectsCreated);
$subjectsCreated->setAuthor($this);
}
return $this;
}
public function removeSubjectsCreated(Subject $subjectsCreated): static
{
if ($this->subjectsCreated->removeElement($subjectsCreated)) {
// set the owning side to null (unless already changed)
if ($subjectsCreated->getAuthor() === $this) {
$subjectsCreated->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, News>
*/
public function getNewsEdited(): Collection
{
return $this->newsEdited;
}
public function addNewsEdited(News $newsEdited): static
{
if (!$this->newsEdited->contains($newsEdited)) {
$this->newsEdited->add($newsEdited);
$newsEdited->setEditor($this);
}
return $this;
}
public function removeNewsEdited(News $newsEdited): static
{
if ($this->newsEdited->removeElement($newsEdited)) {
// set the owning side to null (unless already changed)
if ($newsEdited->getEditor() === $this) {
$newsEdited->setEditor(null);
}
}
return $this;
}
/**
* @return Collection<int, PunishCategory>
*/
public function getPunishCategories(): Collection
{
return $this->punishCategories;
}
public function addPunishCategory(PunishCategory $punishCategory): static
{
if (!$this->punishCategories->contains($punishCategory)) {
$this->punishCategories->add($punishCategory);
$punishCategory->setAuthor($this);
}
return $this;
}
public function removePunishCategory(PunishCategory $punishCategory): static
{
if ($this->punishCategories->removeElement($punishCategory)) {
// set the owning side to null (unless already changed)
if ($punishCategory->getAuthor() === $this) {
$punishCategory->setAuthor(null);
}
}
return $this;
}
public function getLastRequestTs(): ?string
{
return $this->lastRequestTs;
}
public function setLastRequestTs(?string $lastRequestTs): static
{
$this->lastRequestTs = $lastRequestTs;
return $this;
}
public function getSchool(): ?School
{
return $this->school;
}
public function setSchool(?School $school): static
{
$this->school = $school;
return $this;
}
/**
* @return Collection<int, DiscussionClassMessage>
*/
public function getDiscussionClassMessages(): Collection
{
return $this->discussionClassMessages;
}
public function addDiscussionClassMessage(DiscussionClassMessage $discussionClassMessage): static
{
if (!$this->discussionClassMessages->contains($discussionClassMessage)) {
$this->discussionClassMessages->add($discussionClassMessage);
$discussionClassMessage->setAuthor($this);
}
return $this;
}
public function removeDiscussionClassMessage(DiscussionClassMessage $discussionClassMessage): static
{
if ($this->discussionClassMessages->removeElement($discussionClassMessage)) {
// set the owning side to null (unless already changed)
if ($discussionClassMessage->getAuthor() === $this) {
$discussionClassMessage->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$agenda->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$examAgenda->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$subSequence->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$quarter->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$subNote->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$agendaDay->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$agendaElement->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, ExamAgendaDay>
*/
public function getExamAgendaDays(): Collection
{
return $this->examAgendaDays;
}
public function addExamAgendaDay(ExamAgendaDay $examAgendaDay): static
{
if (!$this->examAgendaDays->contains($examAgendaDay)) {
$this->examAgendaDays->add($examAgendaDay);
$examAgendaDay->setAuthor($this);
}
return $this;
}
public function removeExamAgendaDay(ExamAgendaDay $examAgendaDay): static
{
if ($this->examAgendaDays->removeElement($examAgendaDay)) {
// set the owning side to null (unless already changed)
if ($examAgendaDay->getAuthor() === $this) {
$examAgendaDay->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, ExamAgendaElement>
*/
public function getExamAgendaElements(): Collection
{
return $this->examAgendaElements;
}
public function addExamAgendaElement(ExamAgendaElement $examAgendaElement): static
{
if (!$this->examAgendaElements->contains($examAgendaElement)) {
$this->examAgendaElements->add($examAgendaElement);
$examAgendaElement->setAuthor($this);
}
return $this;
}
public function removeExamAgendaElement(ExamAgendaElement $examAgendaElement): static
{
if ($this->examAgendaElements->removeElement($examAgendaElement)) {
// set the owning side to null (unless already changed)
if ($examAgendaElement->getAuthor() === $this) {
$examAgendaElement->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$appreciation->setAuthor(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->setUser($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->getUser() === $this) {
$localAccount->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, NewsBookmark>
*/
public function getNewsBookmarks(): Collection
{
return $this->newsBookmarks;
}
public function addNewsBookmark(NewsBookmark $newsBookmark): static
{
if (!$this->newsBookmarks->contains($newsBookmark)) {
$this->newsBookmarks->add($newsBookmark);
$newsBookmark->setUser($this);
}
return $this;
}
/**
* @return Collection<int, ScolarityHistory>
*/
public function getScolarityHistories(): Collection
{
return $this->scolarityHistories;
}
public function addScolarityHistory(ScolarityHistory $scolarityHistory): static
{
if (!$this->scolarityHistories->contains($scolarityHistory)) {
$this->scolarityHistories->add($scolarityHistory);
$scolarityHistory->setAuthor($this);
}
return $this;
}
public function removeNewsBookmark(NewsBookmark $newsBookmark): static
{
if ($this->newsBookmarks->removeElement($newsBookmark)) {
// set the owning side to null (unless already changed)
if ($newsBookmark->getUser() === $this) {
$newsBookmark->setUser(null);
}
return $this;
}
}
public function removeScolarityHistory(ScolarityHistory $scolarityHistory): static
{
if ($this->scolarityHistories->removeElement($scolarityHistory)) {
// set the owning side to null (unless already changed)
if ($scolarityHistory->getAuthor() === $this) {
$scolarityHistory->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, HomeworkBookmark>
*/
public function getHomeworkBookmarks(): Collection
{
return $this->homeworkBookmarks;
}
public function addHomeworkBookmark(HomeworkBookmark $homeworkBookmark): static
{
if (!$this->homeworkBookmarks->contains($homeworkBookmark)) {
$this->homeworkBookmarks->add($homeworkBookmark);
$homeworkBookmark->setUser($this);
}
return $this;
}
/**
* @return Collection<int, ScolarityHistoryEdition>
*/
public function getScolarityHistoryEditions(): Collection
{
return $this->scolarityHistoryEditions;
}
public function addScolarityHistoryEditon(ScolarityHistoryEdition $scolarityHistoryEdition): static
{
if (!$this->scolarityHistoryEditions->contains($scolarityHistoryEdition)) {
$this->scolarityHistoryEditions->add($scolarityHistoryEdition);
$scolarityHistoryEdition->setAuthor($this);
}
return $this;
}
public function removeHomeworkBookmark(HomeworkBookmark $homeworkBookmark): static
{
if ($this->homeworkBookmarks->removeElement($homeworkBookmark)) {
// set the owning side to null (unless already changed)
if ($homeworkBookmark->getUser() === $this) {
$homeworkBookmark->setUser(null);
}
return $this;
}
}
public function removeScolarityHistoryEdition(ScolarityHistoryEdition $scolarityHistoryEdition): static
{
if ($this->scolarityHistoryEditions->removeElement($scolarityHistoryEdition)) {
// set the owning side to null (unless already changed)
if ($scolarityHistoryEdition->getAuthor() === $this) {
$scolarityHistoryEdition->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$justifyAbsence->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, VerbalProcess>
*/
public function getVerbalProcesses(): Collection
{
return $this->verbalProcesses;
}
public function addVerbalProcess(VerbalProcess $verbalProcess): static
{
if (!$this->verbalProcesses->contains($verbalProcess)) {
$this->verbalProcesses->add($verbalProcess);
$verbalProcess->setAuthor($this);
}
return $this;
}
public function removeVerbalProcess(VerbalProcess $verbalProcess): static
{
if ($this->verbalProcesses->removeElement($verbalProcess)) {
// set the owning side to null (unless already changed)
if ($verbalProcess->getAuthor() === $this) {
$verbalProcess->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$absenceDisciplineConcileConfig->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, TheClass>
*/
public function getTheClassesTeached(): Collection
{
return $this->theClassesTeached;
}
public function addTheClassesTeached(TheClass $theClassesTeached): static
{
if (!$this->theClassesTeached->contains($theClassesTeached)) {
$this->theClassesTeached->add($theClassesTeached);
$theClassesTeached->setProf($this);
}
return $this;
}
public function removeTheClassesTeached(TheClass $theClassesTeached): static
{
if ($this->theClassesTeached->removeElement($theClassesTeached)) {
// set the owning side to null (unless already changed)
if ($theClassesTeached->getProf() === $this) {
$theClassesTeached->setProf(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->setAuthor($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->getAuthor() === $this) {
$primaryNote->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$verbalProcessCategory->setAuthor(null);
}
}
return $this;
}
public function getTheme(): ?string
{
return $this->theme;
}
public function setTheme(?string $theme): static
{
$this->theme = $theme;
return $this;
}
public function getPicture(): ?string
{
return $this->picture;
}
public function setPicture(?string $picture): static
{
$this->picture = $picture;
return $this;
}
public function getSexe(): ?string
{
return $this->sexe;
}
public function setSexe(?string $sexe): static
{
$this->sexe = $sexe;
return $this;
}
/**
* @return Collection<int, UserAndroidToken>
*/
public function getUserAndroidTokens(): Collection
{
return $this->userAndroidTokens;
}
public function addUserAndroidToken(UserAndroidToken $userAndroidToken): static
{
if (!$this->userAndroidTokens->contains($userAndroidToken)) {
$this->userAndroidTokens->add($userAndroidToken);
$userAndroidToken->setUser($this);
}
return $this;
}
public function removeUserAndroidToken(UserAndroidToken $userAndroidToken): static
{
if ($this->userAndroidTokens->removeElement($userAndroidToken)) {
// set the owning side to null (unless already changed)
if ($userAndroidToken->getUser() === $this) {
$userAndroidToken->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, UserIphoneToken>
*/
public function getUserIphoneTokens(): Collection
{
return $this->userIphoneTokens;
}
public function addUserIphoneToken(UserIphoneToken $userIphoneToken): static
{
if (!$this->userIphoneTokens->contains($userIphoneToken)) {
$this->userIphoneTokens->add($userIphoneToken);
$userIphoneToken->setUser($this);
}
return $this;
}
public function removeUserIphoneToken(UserIphoneToken $userIphoneToken): static
{
if ($this->userIphoneTokens->removeElement($userIphoneToken)) {
// set the owning side to null (unless already changed)
if ($userIphoneToken->getUser() === $this) {
$userIphoneToken->setUser(null);
}
}
return $this;
}
public function getLocalPhoneLang(): ?string
{
return $this->localPhoneLang;
}
public function setLocalPhoneLang(?string $localPhoneLang): static
{
$this->localPhoneLang = $localPhoneLang;
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->setAuthor($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->getAuthor() === $this) {
$absenceBlameConfig->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$absenceWarningConfig->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$absencePunishConfig->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$absenceExclusionConfig->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$globalDisciplineEnabledConfig->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$absenceRetainedConfig->setAuthor(null);
}
}
return $this;
}
public function getUserToken(): ?string
{
return $this->userToken;
}
public function setUserToken(?string $userToken): static
{
$this->userToken = $userToken;
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->setAuthor($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->getAuthor() === $this) {
$disciplineConcile->setAuthor(null);
}
}
return $this;
}
/**
* @return Collection<int, RefreshToken>
*/
public function getRefreshTokens(): Collection
{
return $this->refreshTokens;
}
public function addRefreshToken(RefreshToken $refreshToken): static
{
if (!$this->refreshTokens->contains($refreshToken)) {
$this->refreshTokens->add($refreshToken);
$refreshToken->setUser($this);
}
return $this;
}
public function removeRefreshToken(RefreshToken $refreshToken): static
{
if ($this->refreshTokens->removeElement($refreshToken)) {
// set the owning side to null (unless already changed)
if ($refreshToken->getUser() === $this) {
$refreshToken->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, UserNotification>
*/
public function getUserNotifications(): Collection
{
return $this->userNotifications;
}
public function addUserNotification(UserNotification $userNotification): static
{
if (!$this->userNotifications->contains($userNotification)) {
$this->userNotifications->add($userNotification);
$userNotification->setUser($this);
}
return $this;
}
public function removeUserNotification(UserNotification $userNotification): static
{
if ($this->userNotifications->removeElement($userNotification)) {
// set the owning side to null (unless already changed)
if ($userNotification->getUser() === $this) {
$userNotification->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, DiscussionClassMessage>
*/
public function getDiscussionClassMessagesRead(): Collection
{
return $this->discussionClassMessagesRead;
}
public function addDiscussionClassMessagesRead(DiscussionClassMessage $discussionClassMessagesRead): static
{
if (!$this->discussionClassMessagesRead->contains($discussionClassMessagesRead)) {
$this->discussionClassMessagesRead->add($discussionClassMessagesRead);
$discussionClassMessagesRead->addReader($this);
}
return $this;
}
public function removeDiscussionClassMessagesRead(DiscussionClassMessage $discussionClassMessagesRead): static
{
if ($this->discussionClassMessagesRead->removeElement($discussionClassMessagesRead)) {
$discussionClassMessagesRead->removeReader($this);
}
return $this;
}
/**
* @return Collection<int, AgendaTimeConvertion>
*/
public function getAgendaTimeConvertions(): Collection
{
return $this->agendaTimeConvertions;
}
public function addAgendaTimeConvertion(AgendaTimeConvertion $agendaTimeConvertion): static
{
if (!$this->agendaTimeConvertions->contains($agendaTimeConvertion)) {
$this->agendaTimeConvertions->add($agendaTimeConvertion);
$agendaTimeConvertion->setAuthor($this);
}
return $this;
}
public function removeAgendaTimeConvertion(AgendaTimeConvertion $agendaTimeConvertion): static
{
if ($this->agendaTimeConvertions->removeElement($agendaTimeConvertion)) {
// set the owning side to null (unless already changed)
if ($agendaTimeConvertion->getAuthor() === $this) {
$agendaTimeConvertion->setAuthor(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->setAuthor($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->getAuthor() === $this) {
$competence->setAuthor(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->setProf($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->getProf() === $this) {
$profTime->setProf(null);
}
}
return $this;
}
}