src/Entity/Adherent/MagasinConviction.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Adherent;
  3. use App\Entity\Webfactory\Widget\Classique\Conviction;
  4. use App\Repository\Adherent\MagasinConvictionRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassMagasinConvictionRepository::class)]
  9. class MagasinConviction implements \Stringable
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\ManyToOne(targetEntityMagasin::class, inversedBy'magasinConvictions')]
  16.     #[ORM\JoinColumn(name'magasin'referencedColumnName'k_adherent'nullablefalse)]
  17.     private $k_adherent;
  18.     #[ORM\Column(type'string'length255)]
  19.     private $name;
  20.     #[ORM\Column(type'text'nullabletrue)]
  21.     private $conviction;
  22.     #[ORM\Column(type'boolean')]
  23.     private $active;
  24.     #[ORM\Column(type'datetime_immutable')]
  25.     private $created_at;
  26.     #[ORM\ManyToMany(targetEntityPlateformDiffusion::class, inversedBy'magasinConvictions')]
  27.     private $plateform;
  28.     #[ORM\Column(name'lang'type'string')]
  29.     private $lang;
  30.     public function __construct()
  31.     {
  32.         $this->plateform = new ArrayCollection();
  33.         $this->created_at = new \DateTimeImmutable("now");
  34.         $this->verbatims = new ArrayCollection();
  35.     }
  36.     public function __toString(): string{
  37.         return (string) $this->name;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getKAdherent(): ?Magasin
  44.     {
  45.         return $this->k_adherent;
  46.     }
  47.     public function setKAdherent(?Magasin $k_adherent): self
  48.     {
  49.         $this->k_adherent $k_adherent;
  50.         return $this;
  51.     }
  52.     public function getName(): ?string
  53.     {
  54.         return $this->name;
  55.     }
  56.     public function setName(string $name): self
  57.     {
  58.         $this->name $name;
  59.         return $this;
  60.     }
  61.     public function getConviction(): ?string
  62.     {
  63.         return $this->conviction;
  64.     }
  65.     public function setConviction(?string $conviction): self
  66.     {
  67.         $this->conviction $conviction;
  68.         return $this;
  69.     }
  70.     public function getActive(): ?bool
  71.     {
  72.         return $this->active;
  73.     }
  74.     public function setActive(bool $active): self
  75.     {
  76.         $this->active $active;
  77.         return $this;
  78.     }
  79.     public function getCreatedAt(): ?\DateTimeImmutable
  80.     {
  81.         return $this->created_at;
  82.     }
  83.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  84.     {
  85.         $this->created_at $created_at;
  86.         return $this;
  87.     }
  88.     /**
  89.      * @return Collection|PlateformDiffusion[]
  90.      */
  91.     public function getPlateform(): Collection
  92.     {
  93.         return $this->plateform;
  94.     }
  95.     public function addPlateform(PlateformDiffusion $plateform): self
  96.     {
  97.         if (!$this->plateform->contains($plateform)) {
  98.             $this->plateform[] = $plateform;
  99.         }
  100.         return $this;
  101.     }
  102.     public function removePlateform(PlateformDiffusion $plateform): self
  103.     {
  104.         $this->plateform->removeElement($plateform);
  105.         return $this;
  106.     }
  107.     /**
  108.      * @return mixed
  109.      */
  110.     public function getLang()
  111.     {
  112.         return $this->lang;
  113.     }
  114.     public function setLang(mixed $lang): void
  115.     {
  116.         $this->lang $lang;
  117.     }
  118. }