src/Entity/Apropos.php line 19
<?phpnamespace App\Entity;use App\Entity\Traits\Timestamp;use App\Repository\AproposRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Symfony\Component\HttpFoundation\File\UploadedFile;use Vich\UploaderBundle\Mapping\Annotation as Vich;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: AproposRepository::class)]#[ORM\HasLifecycleCallbacks]#[Vich\Uploadable]class Apropos{use Timestamp;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255, nullable: true)]private ?string $email = null;#[ORM\Column(length: 255, nullable: true)]private ?string $telephone = null;/*** @var File|null**/#[Assert\Image(maxSize: '50M', maxSizeMessage: 'Image trop volumineuse maximum 10Mb')]#[Assert\Image(mimeTypes: ["image/jpeg", "image/jpg", "image/png", "image/avif"], mimeTypesMessage: "Mauvais format d'image (jpeg, jpg et png)")]#[Vich\UploadableField(mapping: 'auteurs', fileNameProperty: 'photo')]private $photoFile;#[ORM\Column(length: 255, nullable: true)]private ?string $photo = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $presentation = null;#[ORM\ManyToOne(inversedBy: 'apropos')]private ?User $user = null;#[ORM\Column]private ?bool $online = null;#[ORM\Column(nullable: true)]private ?int $anneeExperience = null;#[ORM\Column(length: 255, nullable: true)]private ?string $fonction = null;#[ORM\Column(length: 255, nullable: true)]private ?string $bureau = null;#[ORM\Column(length: 255, nullable: true)]private ?string $whatsapp = null;#[ORM\OneToMany(mappedBy: 'apropos', targetEntity: Communaute::class, cascade: ['persist'])]private Collection $communautes;/*** @var File|null**/#[Assert\Image(maxSize: '50M', maxSizeMessage: 'Image trop volumineuse maximum 10Mb')]#[Assert\Image(mimeTypes: ["image/jpeg", "image/jpg", "image/png", "image/avif"], mimeTypesMessage: "Mauvais format d'image (jpeg, jpg et png)")]#[Vich\UploadableField(mapping: 'auteurs', fileNameProperty: 'image')]private $imageFile;#[ORM\Column(length: 255, nullable: true)]private ?string $image = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $historique = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $mission = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $approche = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $vision = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $valeurs = null;public function __construct(){$this->communautes = new ArrayCollection();}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;}public function getTelephone(): ?string{return $this->telephone;}public function setTelephone(string $telephone): self{$this->telephone = $telephone;return $this;}public function getPhoto(): ?string{return $this->photo;}public function setPhoto(?string $photo): self{$this->photo = $photo;return $this;}public function getPresentation(): ?string{return $this->presentation;}public function setPresentation(?string $presentation): self{$this->presentation = $presentation;return $this;}/*** @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $imageFile*/public function setImageFile(?File $imageFile = null): void{$this->imageFile = $imageFile;if (null !== $imageFile) {// It is required that at least one field changes if you are using doctrine// otherwise the event listeners won't be called and the file is lost$this->setUpdated(new \DateTimeImmutable());}}public function getImageFile(): ?File{return $this->imageFile;}/*** @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $photoFile*/public function setPhotoFile(?File $photoFile = null): void{$this->photoFile = $photoFile;if (null !== $photoFile) {// It is required that at least one field changes if you are using doctrine// otherwise the event listeners won't be called and the file is lost$this->setUpdated(new \DateTimeImmutable());}}public function getPhotoFile(): ?File{return $this->photoFile;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): self{$this->user = $user;return $this;}public function isOnline(): ?bool{return $this->online;}public function setOnline(bool $online): self{$this->online = $online;return $this;}public function getAnneeExperience(): ?int{return $this->anneeExperience;}public function setAnneeExperience(?int $anneeExperience): self{$this->anneeExperience = $anneeExperience;return $this;}public function __toString(){return $this->getEmail();}public function getFonction(): ?string{return $this->fonction;}public function setFonction(?string $fonction): self{$this->fonction = $fonction;return $this;}public function getBureau(): ?string{return $this->bureau;}public function setBureau(?string $bureau): self{$this->bureau = $bureau;return $this;}public function getWhatsapp(): ?string{return $this->whatsapp;}public function setWhatsapp(?string $whatsapp): self{$this->whatsapp = $whatsapp;return $this;}/*** @return Collection<int, Communaute>*/public function getCommunautes(): Collection{return $this->communautes;}public function addCommunaute(Communaute $communaute): self{if (!$this->communautes->contains($communaute)) {$this->communautes->add($communaute);$communaute->setApropos($this);}return $this;}public function removeCommunaute(Communaute $communaute): self{if ($this->communautes->removeElement($communaute)) {// set the owning side to null (unless already changed)if ($communaute->getApropos() === $this) {$communaute->setApropos(null);}}return $this;}public function getImage(): ?string{return $this->image;}public function setImage(?string $image): self{$this->image = $image;return $this;}public function getHistorique(): ?string{return $this->historique;}public function setHistorique(?string $historique): static{$this->historique = $historique;return $this;}public function getMission(): ?string{return $this->mission;}public function setMission(?string $mission): static{$this->mission = $mission;return $this;}public function getApproche(): ?string{return $this->approche;}public function setApproche(?string $approche): static{$this->approche = $approche;return $this;}public function getVision(): ?string{return $this->vision;}public function setVision(?string $vision): static{$this->vision = $vision;return $this;}public function getValeurs(): ?string{return $this->valeurs;}public function setValeurs(?string $valeurs): static{$this->valeurs = $valeurs;return $this;}}