src/Entity/Landingpage.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LandingpageRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassLandingpageRepository::class)]
  9. #[ORM\HasLifecycleCallbacks]
  10. class Landingpage
  11. {
  12.     use \App\Traits\EntityDateTimeAbleTrait;
  13.     
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column(type'integer')]
  17.     private $id;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private ?string $name null;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private ?string $slug null;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private ?string $eventName null;
  24.     #[ORM\Column(type'date')]
  25.     private ?\DateTimeInterface $eventDate null;
  26.     #[ORM\OneToMany(targetEntityProfile::class, mappedBy'landingpage')]
  27.     private Collection $profiles;
  28.     #[ORM\OneToMany(mappedBy'landingpage'targetEntityLandingpageFile::class)]
  29.     private Collection $landingpageFiles;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $video null;
  32.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  33.     private ?string $description null;
  34.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  35.     private ?\DateTimeInterface $eventEndDate null;
  36.     #[ORM\ManyToOne(inversedBy'landingpages')]
  37.     private ?Campaign $campaign null;
  38.     #[ORM\Column(nullabletrue)]
  39.     private ?bool $isAgent null;
  40.     public function __construct()
  41.     {
  42.         $this->profiles = new ArrayCollection();
  43.         $this->landingpageFiles = new ArrayCollection();
  44.     }
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getName(): ?string
  50.     {
  51.         return $this->name;
  52.     }
  53.     public function setName(?string $name): self
  54.     {
  55.         $this->name $name;
  56.         return $this;
  57.     }
  58.     public function getSlug(): ?string
  59.     {
  60.         return $this->slug;
  61.     }
  62.     public function setSlug(?string $slug): self
  63.     {
  64.         $this->slug $slug;
  65.         return $this;
  66.     }
  67.     public function getEventName(): ?string
  68.     {
  69.         return $this->eventName;
  70.     }
  71.     public function setEventName(?string $eventName): self
  72.     {
  73.         $this->eventName $eventName;
  74.         return $this;
  75.     }
  76.     public function getEventDate(): ?\DateTimeInterface
  77.     {
  78.         return $this->eventDate;
  79.     }
  80.     public function setEventDate(\DateTimeInterface $eventDate): self
  81.     {
  82.         $this->eventDate $eventDate;
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return Collection<int, Profile>
  87.      */
  88.     public function getProfiles(): Collection
  89.     {
  90.         return $this->profiles;
  91.     }
  92.     public function addProfile(Profile $profile): self
  93.     {
  94.         if (!$this->profiles->contains($profile)) {
  95.             $this->profiles[] = $profile;
  96.             $profile->setLandingpage($this);
  97.         }
  98.         return $this;
  99.     }
  100.     public function removeProfile(Profile $profile): self
  101.     {
  102.         if ($this->profiles->removeElement($profile)) {
  103.             // set the owning side to null (unless already changed)
  104.             if ($profile->getLandingpage() === $this) {
  105.                 $profile->setLandingpage(null);
  106.             }
  107.         }
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return Collection<int, LandingpageFile>
  112.      */
  113.     public function getLandingpageFiles(): Collection
  114.     {
  115.         return $this->landingpageFiles;
  116.     }
  117.     public function addLandingpageFile(LandingpageFile $landingpageFile): static
  118.     {
  119.         if (!$this->landingpageFiles->contains($landingpageFile)) {
  120.             $this->landingpageFiles->add($landingpageFile);
  121.             $landingpageFile->setLandingpage($this);
  122.         }
  123.         return $this;
  124.     }
  125.     public function removeLandingpageFile(LandingpageFile $landingpageFile): static
  126.     {
  127.         if ($this->landingpageFiles->removeElement($landingpageFile)) {
  128.             // set the owning side to null (unless already changed)
  129.             if ($landingpageFile->getLandingpage() === $this) {
  130.                 $landingpageFile->setLandingpage(null);
  131.             }
  132.         }
  133.         return $this;
  134.     }
  135.     public function getVideo(): ?string
  136.     {
  137.         return $this->video;
  138.     }
  139.     public function setVideo(?string $video): static
  140.     {
  141.         $this->video $video;
  142.         return $this;
  143.     }
  144.     public function getDescription(): ?string
  145.     {
  146.         return $this->description;
  147.     }
  148.     public function setDescription(?string $description): static
  149.     {
  150.         $this->description $description;
  151.         return $this;
  152.     }
  153.     public function getEventEndDate(): ?\DateTimeInterface
  154.     {
  155.         return $this->eventEndDate;
  156.     }
  157.     public function setEventEndDate(?\DateTimeInterface $eventEndDate): static
  158.     {
  159.         $this->eventEndDate $eventEndDate;
  160.         return $this;
  161.     }
  162.     public function getCampaign(): ?Campaign
  163.     {
  164.         return $this->campaign;
  165.     }
  166.     public function setCampaign(?Campaign $campaign): static
  167.     {
  168.         $this->campaign $campaign;
  169.         return $this;
  170.     }
  171.     public function isIsAgent(): ?bool
  172.     {
  173.         return $this->isAgent;
  174.     }
  175.     public function setIsAgent(?bool $isAgent): static
  176.     {
  177.         $this->isAgent $isAgent;
  178.         return $this;
  179.     }
  180. }