<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
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;
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[UniqueEntity(fields: ['email'], message: 'There is already an account with this email')]
#[ApiResource]
class User implements UserInterface, PasswordAuthenticatedUserInterface
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 180, unique: true)]
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)]
private ?string $adresse = null;
#[ORM\Column(length: 255 , nullable: true)]
private ?string $phone = null;
#[ORM\Column(length: 255 , nullable: true) ]
private ?string $options = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $logo = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prenom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $phone1 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fb = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Linkedin = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $biographie = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $cv = null;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Diplome::class,cascade: ['remove'])]
private Collection $diplome;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Certificat::class,cascade: ['remove'])]
private Collection $certificat;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Experience::class,cascade: ['remove'])]
private Collection $experiences;
#[ORM\Column(length: 255, nullable: true)]
private ?string $poste = null;
#[ORM\OneToMany(mappedBy: 'formateur', targetEntity: Formation::class,cascade: ['remove'])]
private Collection $formations;
#[ORM\Column(length: 255, nullable: true)]
private ?string $pays = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $responsable = null;
#[ORM\OneToMany(mappedBy: 'stagiaire', targetEntity: InscritSession::class,cascade: ['remove'])]
private Collection $inscritSessions;
// #[ORM\ManyToOne(inversedBy: 'user')]
// private ?Messageinscrit $messageinscrit = null;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Messageinscrit::class,cascade: ['remove'])]
private Collection $messageinscrits;
#[ORM\Column(length: 255, nullable: true)]
private ?string $siteweb = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $github = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $twitter = null;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Reclamation::class,cascade: ['remove'])]
private Collection $reclamations;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Evaluation::class,cascade: ['remove'])]
private Collection $evaluations;
#[ORM\OneToMany(mappedBy: 'formateur', targetEntity: Evenement::class,cascade: ['remove'])]
private Collection $evenements;
#[ORM\OneToMany(mappedBy: 'formateur', targetEntity: VirtualClassroom::class,cascade: ['remove'])]
private Collection $virtualClassrooms;
#[ORM\OneToMany(mappedBy: 'destinataire', targetEntity: Reponsereclamation::class,cascade: ['remove'])]
private Collection $reponsereclamations;
#[ORM\Column(nullable: true)]
private ?bool $vue = null;
#[ORM\OneToMany(mappedBy: 'relationus', targetEntity: Offresinscrit::class,cascade: ['remove'])]
private Collection $offresinscrits;
#[ORM\OneToMany(mappedBy: 'destinataire', targetEntity: Reponsemessage::class,cascade: ['remove'])]
private Collection $reponsemessages;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $vu = null;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Demmandeformation::class,cascade: ['remove'])]
private Collection $demmandeformations;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Demandeprofil::class,cascade: ['remove'])]
private Collection $demandeprofils;
#[ORM\OneToMany(mappedBy: 'expediteur', targetEntity: ReponseDemandeFormation::class,cascade: ['remove'])]
private Collection $reponseDemandeFormations;
#[ORM\OneToMany(mappedBy: 'destinataire', targetEntity: ReponseDemandeFormation::class,cascade: ['remove'])]
private Collection $reponseDemandeFormationsdest;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Emailsadmin::class,cascade: ['remove'])]
private Collection $emailsadmins;
#[ORM\ManyToMany(targetEntity: TacheAssistant::class, inversedBy: 'users')]
private Collection $taches;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Trace::class,cascade: ['remove'])]
private Collection $traces;
#[ORM\Column(length: 255, nullable: true)]
private ?string $ipadress = null;
#[ORM\OneToMany(mappedBy: 'student', targetEntity: EmailStudent::class,cascade: ['remove'])]
private Collection $emailStudents;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Signature::class)]
private Collection $signatures;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Ipadresse::class , cascade: ['remove'])]
private Collection $ipadresses;
#[ORM\Column(nullable: true)]
private ?bool $isActive = null;
#[ORM\OneToMany(mappedBy: 'formateur', targetEntity: FormationElearning::class)]
private Collection $formationElearnings;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Commande::class)]
private Collection $commandes;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: EvaluationElearning::class)]
private Collection $evaluationElearnings;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nomsociete = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adressesociete = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $matricule = null;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: CommentElearning::class)]
private Collection $commentElearnings;
#[ORM\ManyToMany(targetEntity: CommentElearning::class, mappedBy: 'likedBy')]
private Collection $commentLikes;
#[ORM\OneToMany(mappedBy: 'sender', targetEntity: ChatFormation::class)]
private Collection $chatFormations;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Coupon::class)]
private Collection $coupons;
public function __construct()
{
$this->diplome = new ArrayCollection();
$this->certificat = new ArrayCollection();
$this->experiences = new ArrayCollection();
$this->formations = new ArrayCollection();
$this->inscritSessions = new ArrayCollection();
$this->messageinscrits = new ArrayCollection();
$this->reclamations = new ArrayCollection();
$this->evaluations = new ArrayCollection();
$this->evenements = new ArrayCollection();
$this->virtualClassrooms = new ArrayCollection();
$this->reponsereclamations = new ArrayCollection();
$this->offresinscrits = new ArrayCollection();
$this->reponsemessages = new ArrayCollection();
$this->demmandeformations = new ArrayCollection();
$this->demandeprofils = new ArrayCollection();
$this->reponseDemandeFormations = new ArrayCollection();
$this->reponseDemandeFormationsdest = new ArrayCollection();
$this->emailsadmins = new ArrayCollection();
$this->taches = new ArrayCollection();
$this->traces = new ArrayCollection();
$this->emailStudents = new ArrayCollection();
$this->signatures = new ArrayCollection();
$this->ipadresses = new ArrayCollection();
$this->formationElearnings = new ArrayCollection();
$this->commandes = new ArrayCollection();
$this->evaluationElearnings = new ArrayCollection();
$this->commentElearnings = new ArrayCollection();
$this->commentLikes = new ArrayCollection();
$this->chatFormations = new ArrayCollection();
$this->coupons = new ArrayCollection();
}
public function __toString(): string
{
return $this->getNom();
}
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$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): self
{
$this->roles = $roles;
return $this;
}
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getOptions(): ?string
{
return $this->options;
}
public function setOptions(string $options): self
{
$this->options = $options;
return $this;
}
public function getLogo(): ?string
{
return $this->logo;
}
public function setLogo(?string $logo): self
{
$this->logo = $logo;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getPhone1(): ?string
{
return $this->phone1;
}
public function setPhone1(?string $phone1): self
{
$this->phone1 = $phone1;
return $this;
}
public function getFb(): ?string
{
return $this->fb;
}
public function setFb(?string $fb): self
{
$this->fb = $fb;
return $this;
}
public function getLinkedin(): ?string
{
return $this->Linkedin;
}
public function setLinkedin(?string $Linkedin): self
{
$this->Linkedin = $Linkedin;
return $this;
}
public function getBiographie(): ?string
{
return $this->biographie;
}
public function setBiographie(?string $biographie): self
{
$this->biographie = $biographie;
return $this;
}
public function getCv(): ?string
{
return $this->cv;
}
public function setCv(?string $cv): self
{
$this->cv = $cv;
return $this;
}
/**
* @return Collection<int, Diplome>
*/
public function getDiplome(): Collection
{
return $this->diplome;
}
public function addDiplome(Diplome $diplome): self
{
if (!$this->diplome->contains($diplome)) {
$this->diplome->add($diplome);
$diplome->setUser($this);
}
return $this;
}
public function removeDiplome(Diplome $diplome): self
{
if ($this->diplome->removeElement($diplome)) {
// set the owning side to null (unless already changed)
if ($diplome->getUser() === $this) {
$diplome->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Certificat>
*/
public function getCertificat(): Collection
{
return $this->certificat;
}
public function addCertificat(Certificat $certificat): self
{
if (!$this->certificat->contains($certificat)) {
$this->certificat->add($certificat);
$certificat->setUser($this);
}
return $this;
}
public function removeCertificat(Certificat $certificat): self
{
if ($this->certificat->removeElement($certificat)) {
// set the owning side to null (unless already changed)
if ($certificat->getUser() === $this) {
$certificat->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Experience>
*/
public function getExperiences(): Collection
{
return $this->experiences;
}
public function addExperience(Experience $experience): self
{
if (!$this->experiences->contains($experience)) {
$this->experiences->add($experience);
$experience->setUser($this);
}
return $this;
}
public function removeExperience(Experience $experience): self
{
if ($this->experiences->removeElement($experience)) {
// set the owning side to null (unless already changed)
if ($experience->getUser() === $this) {
$experience->setUser(null);
}
}
return $this;
}
public function getPoste(): ?string
{
return $this->poste;
}
public function setPoste(?string $poste): self
{
$this->poste = $poste;
return $this;
}
/**
* @return Collection<int, Formation>
*/
public function getFormations(): Collection
{
return $this->formations;
}
public function addFormation(Formation $formation): self
{
if (!$this->formations->contains($formation)) {
$this->formations->add($formation);
$formation->setFormateur($this);
}
return $this;
}
public function removeFormation(Formation $formation): self
{
if ($this->formations->removeElement($formation)) {
// set the owning side to null (unless already changed)
if ($formation->getFormateur() === $this) {
$formation->setFormateur(null);
}
}
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setPays(?string $pays): self
{
$this->pays = $pays;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getResponsable(): ?string
{
return $this->responsable;
}
public function setResponsable(?string $responsable): self
{
$this->responsable = $responsable;
return $this;
}
/**
* @return Collection<int, InscritSession>
*/
public function getInscritSessions(): Collection
{
return $this->inscritSessions;
}
public function addInscritSession(InscritSession $inscritSession): self
{
if (!$this->inscritSessions->contains($inscritSession)) {
$this->inscritSessions->add($inscritSession);
$inscritSession->setStagiaire($this);
}
return $this;
}
public function removeInscritSession(InscritSession $inscritSession): self
{
if ($this->inscritSessions->removeElement($inscritSession)) {
// set the owning side to null (unless already changed)
if ($inscritSession->getStagiaire() === $this) {
$inscritSession->setStagiaire(null);
}
}
return $this;
}
// public function getMessageinscrit(): ?Messageinscrit
// {
// return $this->messageinscrit;
// }
//
// public function setMessageinscrit(?Messageinscrit $messageinscrit): self
// {
// $this->messageinscrit = $messageinscrit;
//
// return $this;
// }
/**
* @return Collection<int, Messageinscrit>
*/
public function getMessageinscrits(): Collection
{
return $this->messageinscrits;
}
public function addMessageinscrit(Messageinscrit $messageinscrit): self
{
if (!$this->messageinscrits->contains($messageinscrit)) {
$this->messageinscrits->add($messageinscrit);
$messageinscrit->setUser($this);
}
return $this;
}
public function removeMessageinscrit(Messageinscrit $messageinscrit): self
{
if ($this->messageinscrits->removeElement($messageinscrit)) {
// set the owning side to null (unless already changed)
if ($messageinscrit->getUser() === $this) {
$messageinscrit->setUser(null);
}
}
return $this;
}
public function getSiteweb(): ?string
{
return $this->siteweb;
}
public function setSiteweb(?string $siteweb): self
{
$this->siteweb = $siteweb;
return $this;
}
public function getGithub(): ?string
{
return $this->github;
}
public function setGithub(?string $github): self
{
$this->github = $github;
return $this;
}
public function getTwitter(): ?string
{
return $this->twitter;
}
public function setTwitter(?string $twitter): self
{
$this->twitter = $twitter;
return $this;
}
/**
* @return Collection<int, Reclamation>
*/
public function getReclamations(): Collection
{
return $this->reclamations;
}
public function addReclamation(Reclamation $reclamation): self
{
if (!$this->reclamations->contains($reclamation)) {
$this->reclamations->add($reclamation);
$reclamation->setUser($this);
}
return $this;
}
public function removeReclamation(Reclamation $reclamation): self
{
if ($this->reclamations->removeElement($reclamation)) {
// set the owning side to null (unless already changed)
if ($reclamation->getUser() === $this) {
$reclamation->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Evaluation>
*/
public function getEvaluations(): Collection
{
return $this->evaluations;
}
public function addEvaluation(Evaluation $evaluation): self
{
if (!$this->evaluations->contains($evaluation)) {
$this->evaluations->add($evaluation);
$evaluation->setUser($this);
}
return $this;
}
public function removeEvaluation(Evaluation $evaluation): self
{
if ($this->evaluations->removeElement($evaluation)) {
// set the owning side to null (unless already changed)
if ($evaluation->getUser() === $this) {
$evaluation->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Evenement>
*/
public function getEvenements(): Collection
{
return $this->evenements;
}
public function addEvenement(Evenement $evenement): self
{
if (!$this->evenements->contains($evenement)) {
$this->evenements->add($evenement);
$evenement->setFormateur($this);
}
return $this;
}
public function removeEvenement(Evenement $evenement): self
{
if ($this->evenements->removeElement($evenement)) {
// set the owning side to null (unless already changed)
if ($evenement->getFormateur() === $this) {
$evenement->setFormateur(null);
}
}
return $this;
}
/**
* @return Collection<int, VirtualClassroom>
*/
public function getVirtualClassrooms(): Collection
{
return $this->virtualClassrooms;
}
public function addVirtualClassroom(VirtualClassroom $virtualClassroom): self
{
if (!$this->virtualClassrooms->contains($virtualClassroom)) {
$this->virtualClassrooms->add($virtualClassroom);
$virtualClassroom->setFormateur($this);
}
return $this;
}
public function removeVirtualClassroom(VirtualClassroom $virtualClassroom): self
{
if ($this->virtualClassrooms->removeElement($virtualClassroom)) {
// set the owning side to null (unless already changed)
if ($virtualClassroom->getFormateur() === $this) {
$virtualClassroom->setFormateur(null);
}
}
return $this;
}
/**
* @return Collection<int, Reponsereclamation>
*/
public function getReponsereclamations(): Collection
{
return $this->reponsereclamations;
}
public function addReponsereclamation(Reponsereclamation $reponsereclamation): self
{
if (!$this->reponsereclamations->contains($reponsereclamation)) {
$this->reponsereclamations->add($reponsereclamation);
$reponsereclamation->setDestinataire($this);
}
return $this;
}
public function removeReponsereclamation(Reponsereclamation $reponsereclamation): self
{
if ($this->reponsereclamations->removeElement($reponsereclamation)) {
// set the owning side to null (unless already changed)
if ($reponsereclamation->getDestinataire() === $this) {
$reponsereclamation->setDestinataire(null);
}
}
return $this;
}
public function isVue(): ?bool
{
return $this->vue;
}
public function setVue(?bool $vue): self
{
$this->vue = $vue;
return $this;
}
/**
* @return Collection<int, Offresinscrit>
*/
public function getOffresinscrits(): Collection
{
return $this->offresinscrits;
}
public function addOffresinscrit(Offresinscrit $offresinscrit): self
{
if (!$this->offresinscrits->contains($offresinscrit)) {
$this->offresinscrits->add($offresinscrit);
$offresinscrit->setRelationus($this);
}
return $this;
}
public function removeOffresinscrit(Offresinscrit $offresinscrit): self
{
if ($this->offresinscrits->removeElement($offresinscrit)) {
// set the owning side to null (unless already changed)
if ($offresinscrit->getRelationus() === $this) {
$offresinscrit->setRelationus(null);
}
}
return $this;
}
/**
* @return Collection<int, Reponsemessage>
*/
public function getReponsemessages(): Collection
{
return $this->reponsemessages;
}
public function addReponsemessage(Reponsemessage $reponsemessage): self
{
if (!$this->reponsemessages->contains($reponsemessage)) {
$this->reponsemessages->add($reponsemessage);
$reponsemessage->setDestinataire($this);
}
return $this;
}
public function removeReponsemessage(Reponsemessage $reponsemessage): self
{
if ($this->reponsemessages->removeElement($reponsemessage)) {
// set the owning side to null (unless already changed)
if ($reponsemessage->getDestinataire() === $this) {
$reponsemessage->setDestinataire(null);
}
}
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getVu(): ?string
{
return $this->vu;
}
public function setVu(?string $vu): self
{
$this->vu = $vu;
return $this;
}
/**
* @return Collection<int, Demmandeformation>
*/
public function getDemmandeformations(): Collection
{
return $this->demmandeformations;
}
public function addDemmandeformation(Demmandeformation $demmandeformation): self
{
if (!$this->demmandeformations->contains($demmandeformation)) {
$this->demmandeformations->add($demmandeformation);
$demmandeformation->setUser($this);
}
return $this;
}
public function removeDemmandeformation(Demmandeformation $demmandeformation): self
{
if ($this->demmandeformations->removeElement($demmandeformation)) {
// set the owning side to null (unless already changed)
if ($demmandeformation->getUser() === $this) {
$demmandeformation->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Demandeprofil>
*/
public function getDemandeprofils(): Collection
{
return $this->demandeprofils;
}
public function addDemandeprofil(Demandeprofil $demandeprofil): self
{
if (!$this->demandeprofils->contains($demandeprofil)) {
$this->demandeprofils->add($demandeprofil);
$demandeprofil->setUser($this);
}
return $this;
}
public function removeDemandeprofil(Demandeprofil $demandeprofil): self
{
if ($this->demandeprofils->removeElement($demandeprofil)) {
// set the owning side to null (unless already changed)
if ($demandeprofil->getUser() === $this) {
$demandeprofil->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, ReponseDemandeFormation>
*/
public function getReponseDemandeFormations(): Collection
{
return $this->reponseDemandeFormations;
}
public function addReponseDemandeFormation(ReponseDemandeFormation $reponseDemandeFormation): self
{
if (!$this->reponseDemandeFormations->contains($reponseDemandeFormation)) {
$this->reponseDemandeFormations->add($reponseDemandeFormation);
$reponseDemandeFormation->setExpediteur($this);
}
return $this;
}
public function removeReponseDemandeFormation(ReponseDemandeFormation $reponseDemandeFormation): self
{
if ($this->reponseDemandeFormations->removeElement($reponseDemandeFormation)) {
// set the owning side to null (unless already changed)
if ($reponseDemandeFormation->getExpediteur() === $this) {
$reponseDemandeFormation->setExpediteur(null);
}
}
return $this;
}
/**
* @return Collection<int, ReponseDemandeFormation>
*/
public function getReponseDemandeFormationsdest(): Collection
{
return $this->reponseDemandeFormationsdest;
}
public function addReponseDemandeFormationsdest(ReponseDemandeFormation $reponseDemandeFormationsdest): self
{
if (!$this->reponseDemandeFormationsdest->contains($reponseDemandeFormationsdest)) {
$this->reponseDemandeFormationsdest->add($reponseDemandeFormationsdest);
$reponseDemandeFormationsdest->setDestinataire($this);
}
return $this;
}
public function removeReponseDemandeFormationsdest(ReponseDemandeFormation $reponseDemandeFormationsdest): self
{
if ($this->reponseDemandeFormationsdest->removeElement($reponseDemandeFormationsdest)) {
// set the owning side to null (unless already changed)
if ($reponseDemandeFormationsdest->getDestinataire() === $this) {
$reponseDemandeFormationsdest->setDestinataire(null);
}
}
return $this;
}
/**
* @return Collection<int, Emailsadmin>
*/
public function getEmailsadmins(): Collection
{
return $this->emailsadmins;
}
public function addEmailsadmin(Emailsadmin $emailsadmin): self
{
if (!$this->emailsadmins->contains($emailsadmin)) {
$this->emailsadmins->add($emailsadmin);
$emailsadmin->setUser($this);
}
return $this;
}
public function removeEmailsadmin(Emailsadmin $emailsadmin): self
{
if ($this->emailsadmins->removeElement($emailsadmin)) {
// set the owning side to null (unless already changed)
if ($emailsadmin->getUser() === $this) {
$emailsadmin->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, TacheAssistant>
*/
public function getTaches(): Collection
{
return $this->taches;
}
public function addTach(TacheAssistant $tach): self
{
if (!$this->taches->contains($tach)) {
$this->taches->add($tach);
}
return $this;
}
public function removeTach(TacheAssistant $tach): self
{
$this->taches->removeElement($tach);
return $this;
}
/**
* @return Collection<int, Trace>
*/
public function getTraces(): Collection
{
return $this->traces;
}
public function addTrace(Trace $trace): self
{
if (!$this->traces->contains($trace)) {
$this->traces->add($trace);
}
return $this;
}
public function removeTrace(Trace $trace): self
{
$this->traces->removeElement($trace);
return $this;
}
public function getIpadress(): ?string
{
return $this->ipadress;
}
public function setIpadress(?string $ipadress): self
{
$this->ipadress = $ipadress;
return $this;
}
/**
* @return Collection<int, EmailStudent>
*/
public function getEmailStudents(): Collection
{
return $this->emailStudents;
}
public function addEmailStudent(EmailStudent $emailStudent): self
{
if (!$this->emailStudents->contains($emailStudent)) {
$this->emailStudents->add($emailStudent);
$emailStudent->setStudent($this);
}
return $this;
}
public function removeEmailStudent(EmailStudent $emailStudent): self
{
if ($this->emailStudents->removeElement($emailStudent)) {
// set the owning side to null (unless already changed)
if ($emailStudent->getStudent() === $this) {
$emailStudent->setStudent(null);
}
}
return $this;
}
/**
* @return Collection<int, Signature>
*/
public function getSignatures(): Collection
{
return $this->signatures;
}
public function addSignature(Signature $signature): self
{
if (!$this->signatures->contains($signature)) {
$this->signatures->add($signature);
$signature->setUser($this);
}
return $this;
}
public function removeSignature(Signature $signature): self
{
if ($this->signatures->removeElement($signature)) {
// set the owning side to null (unless already changed)
if ($signature->getUser() === $this) {
$signature->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Ipadresse>
*/
public function getIpadresses(): Collection
{
return $this->ipadresses;
}
public function addIpadress(Ipadresse $ipadress): self
{
if (!$this->ipadresses->contains($ipadress)) {
$this->ipadresses->add($ipadress);
$ipadress->setUser($this);
}
return $this;
}
public function removeIpadress(Ipadresse $ipadress): self
{
if ($this->ipadresses->removeElement($ipadress)) {
// set the owning side to null (unless already changed)
if ($ipadress->getUser() === $this) {
$ipadress->setUser(null);
}
}
return $this;
}
public function isIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(?bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
/**
* @return Collection<int, FormationElearning>
*/
public function getFormationElearnings(): Collection
{
return $this->formationElearnings;
}
public function addFormationElearning(FormationElearning $formationElearning): self
{
if (!$this->formationElearnings->contains($formationElearning)) {
$this->formationElearnings->add($formationElearning);
$formationElearning->setFormateur($this);
}
return $this;
}
public function removeFormationElearning(FormationElearning $formationElearning): self
{
if ($this->formationElearnings->removeElement($formationElearning)) {
// set the owning side to null (unless already changed)
if ($formationElearning->getFormateur() === $this) {
$formationElearning->setFormateur(null);
}
}
return $this;
}
/**
* @return Collection<int, Commande>
*/
public function getCommandes(): Collection
{
return $this->commandes;
}
public function addCommande(Commande $commande): self
{
if (!$this->commandes->contains($commande)) {
$this->commandes->add($commande);
$commande->setUser($this);
}
return $this;
}
public function removeCommande(Commande $commande): self
{
if ($this->commandes->removeElement($commande)) {
// set the owning side to null (unless already changed)
if ($commande->getUser() === $this) {
$commande->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, EvaluationElearning>
*/
public function getEvaluationElearnings(): Collection
{
return $this->evaluationElearnings;
}
public function addEvaluationElearning(EvaluationElearning $evaluationElearning): self
{
if (!$this->evaluationElearnings->contains($evaluationElearning)) {
$this->evaluationElearnings->add($evaluationElearning);
$evaluationElearning->setUser($this);
}
return $this;
}
public function removeEvaluationElearning(EvaluationElearning $evaluationElearning): self
{
if ($this->evaluationElearnings->removeElement($evaluationElearning)) {
// set the owning side to null (unless already changed)
if ($evaluationElearning->getUser() === $this) {
$evaluationElearning->setUser(null);
}
}
return $this;
}
public function getNomsociete(): ?string
{
return $this->nomsociete;
}
public function setNomsociete(?string $nomsociete): self
{
$this->nomsociete = $nomsociete;
return $this;
}
public function getAdressesociete(): ?string
{
return $this->adressesociete;
}
public function setAdressesociete(?string $adressesociete): self
{
$this->adressesociete = $adressesociete;
return $this;
}
public function getMatricule(): ?string
{
return $this->matricule;
}
public function setMatricule(?string $matricule): self
{
$this->matricule = $matricule;
return $this;
}
/**
* @return Collection<int, CommentElearning>
*/
public function getCommentElearnings(): Collection
{
return $this->commentElearnings;
}
public function addCommentElearning(CommentElearning $commentElearning): self
{
if (!$this->commentElearnings->contains($commentElearning)) {
$this->commentElearnings->add($commentElearning);
$commentElearning->setUser($this);
}
return $this;
}
public function removeCommentElearning(CommentElearning $commentElearning): self
{
if ($this->commentElearnings->removeElement($commentElearning)) {
// set the owning side to null (unless already changed)
if ($commentElearning->getUser() === $this) {
$commentElearning->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, CommentElearning>
*/
public function getCommentLikes(): Collection
{
return $this->commentLikes;
}
public function addCommentLike(CommentElearning $commentLike): self
{
if (!$this->commentLikes->contains($commentLike)) {
$this->commentLikes->add($commentLike);
$commentLike->addLikedBy($this);
}
return $this;
}
public function removeCommentLike(CommentElearning $commentLike): self
{
if ($this->commentLikes->removeElement($commentLike)) {
$commentLike->removeLikedBy($this);
}
return $this;
}
/**
* @return Collection<int, ChatFormation>
*/
public function getChatFormations(): Collection
{
return $this->chatFormations;
}
public function addChatFormation(ChatFormation $chatFormation): self
{
if (!$this->chatFormations->contains($chatFormation)) {
$this->chatFormations->add($chatFormation);
$chatFormation->setSender($this);
}
return $this;
}
public function removeChatFormation(ChatFormation $chatFormation): self
{
if ($this->chatFormations->removeElement($chatFormation)) {
// set the owning side to null (unless already changed)
if ($chatFormation->getSender() === $this) {
$chatFormation->setSender(null);
}
}
return $this;
}
/**
* @return Collection<int, Coupon>
*/
public function getCoupons(): Collection
{
return $this->coupons;
}
public function addCoupon(Coupon $coupon): self
{
if (!$this->coupons->contains($coupon)) {
$this->coupons->add($coupon);
$coupon->setUser($this);
}
return $this;
}
public function removeCoupon(Coupon $coupon): self
{
if ($this->coupons->removeElement($coupon)) {
// set the owning side to null (unless already changed)
if ($coupon->getUser() === $this) {
$coupon->setUser(null);
}
}
return $this;
}
}