src/Entity/NewsletterProspectPartner.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsletterProspectPartnerRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  9. /**
  10.  * @Vich\Uploadable
  11.  */
  12. #[ORM\Entity(repositoryClassNewsletterProspectPartnerRepository::class)]
  13. class NewsletterProspectPartner
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column(type'integer')]
  18.     private $id;
  19.     #[ORM\Column(type'string'length255)]
  20.     private $name;
  21.     #[ORM\Column(type'string'length255)]
  22.     private $title;
  23.     #[ORM\Column(type'datetime')]
  24.     private $updatedAt;
  25.     #[ORM\Column(type'string'length255nullabletrue)]
  26.     private ?string $logoName null;
  27.     /**
  28.      * @Vich\UploadableField(mapping="newsletter_prospect_file", fileNameProperty="logoName")
  29.      * @var File
  30.      */
  31.     private $logoFile;
  32.     #[ORM\Column(type'string'length255)]
  33.     private $avantage1;
  34.     #[ORM\Column(type'string'length255)]
  35.     private $avantage2;
  36.     #[ORM\Column(type'string'length255)]
  37.     private $avantage3;
  38.     #[ORM\Column(type'string'length255)]
  39.     private $avantage4;
  40.     #[ORM\Column(type'string'length255)]
  41.     private $avantage5;
  42.     #[ORM\Column(type'string'length255)]
  43.     private $avantage6;
  44.     #[ORM\OneToMany(mappedBy'partner'targetEntityNewsletterProspect::class)]
  45.     private $newsletterProspect;
  46.     #[ORM\Column(type'string'length255)]
  47.     private $ctaLink;
  48.     public function __construct()
  49.     {
  50.         $this->newsletterProspect = new ArrayCollection();
  51.     }
  52.     public function getId(): ?int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getName(): ?string
  57.     {
  58.         return $this->name;
  59.     }
  60.     public function setName(string $name): self
  61.     {
  62.         $this->name $name;
  63.         return $this;
  64.     }
  65.     public function getTitle(): ?string
  66.     {
  67.         return $this->title;
  68.     }
  69.     public function setTitle(string $title): self
  70.     {
  71.         $this->title $title;
  72.         return $this;
  73.     }
  74.     public function getAvantage1(): ?string
  75.     {
  76.         return $this->avantage1;
  77.     }
  78.     public function setAvantage1(string $avantage1): self
  79.     {
  80.         $this->avantage1 $avantage1;
  81.         return $this;
  82.     }
  83.     public function getAvantage2(): ?string
  84.     {
  85.         return $this->avantage2;
  86.     }
  87.     public function setAvantage2(string $avantage2): self
  88.     {
  89.         $this->avantage2 $avantage2;
  90.         return $this;
  91.     }
  92.     public function getAvantage3(): ?string
  93.     {
  94.         return $this->avantage3;
  95.     }
  96.     public function setAvantage3(string $avantage3): self
  97.     {
  98.         $this->avantage3 $avantage3;
  99.         return $this;
  100.     }
  101.     public function getAvantage4(): ?string
  102.     {
  103.         return $this->avantage4;
  104.     }
  105.     public function setAvantage4(string $avantage4): self
  106.     {
  107.         $this->avantage4 $avantage4;
  108.         return $this;
  109.     }
  110.     public function getAvantage5(): ?string
  111.     {
  112.         return $this->avantage5;
  113.     }
  114.     public function setAvantage5(string $avantage5): self
  115.     {
  116.         $this->avantage5 $avantage5;
  117.         return $this;
  118.     }
  119.     public function getAvantage6(): ?string
  120.     {
  121.         return $this->avantage6;
  122.     }
  123.     public function setAvantage6(string $avantage6): self
  124.     {
  125.         $this->avantage6 $avantage6;
  126.         return $this;
  127.     }
  128.     /**
  129.      * @return Collection<int, NewsletterProspect>
  130.      */
  131.     public function getNewsletterProspect(): Collection
  132.     {
  133.         return $this->newsletterProspect;
  134.     }
  135.     public function addNewsletterProspect(NewsletterProspect $newsletterProspect): self
  136.     {
  137.         if (!$this->newsletterProspect->contains($newsletterProspect)) {
  138.             $this->newsletterProspect[] = $newsletterProspect;
  139.             $newsletterProspect->setPartner($this);
  140.         }
  141.         return $this;
  142.     }
  143.     public function removeNewsletterProspect(NewsletterProspect $newsletterProspect): self
  144.     {
  145.         if ($this->newsletterProspect->removeElement($newsletterProspect)) {
  146.             // set the owning side to null (unless already changed)
  147.             if ($newsletterProspect->getPartner() === $this) {
  148.                 $newsletterProspect->setPartner(null);
  149.             }
  150.         }
  151.         return $this;
  152.     }
  153.   public function getLogoName(): ?string
  154.   {
  155.     return $this->logoName;
  156.   }
  157.   public function setLogoName(?string $logoName): self
  158.   {
  159.     $this->logoName $logoName;
  160.     return $this;
  161.   }
  162.   public function setLogoFile(?File $file null)
  163.   {
  164.     $this->logoFile $file;
  165.     // VERY IMPORTANT:
  166.     // It is required that at least one field changes if you are using Doctrine,
  167.     // otherwise the event listeners won't be called and the file is lost
  168.     if ($file) {
  169.       // if 'updatedAt' is not defined in your entity, use another property
  170.       $this->updatedAt = new \DateTime('now');
  171.     }
  172.   }
  173.   public function getLogoFile()
  174.   {
  175.     return $this->logoFile;
  176.   }
  177.   public function getUpdatedAt(): ?\DateTimeInterface
  178.   {
  179.     return $this->updatedAt;
  180.   }
  181.   public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  182.   {
  183.     $this->updatedAt $updatedAt;
  184.     return $this;
  185.   }
  186.   public function getCtaLink(): ?string
  187.   {
  188.       return $this->ctaLink;
  189.   }
  190.   public function setCtaLink(string $ctaLink): self
  191.   {
  192.       $this->ctaLink $ctaLink;
  193.       return $this;
  194.   }
  195. }