src/Entity/Gos/LeadFormResponsePosition.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\LeadFormResponsePositionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=LeadFormResponsePositionRepository::class)
  9.  */
  10. class LeadFormResponsePosition
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="boolean")
  20.      */
  21.     private $includePosition;
  22.     /**
  23.      * @ORM\Column(type="boolean")
  24.      */
  25.     private $required;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $displayedName;
  30.     /**
  31.      * @ORM\OneToOne(targetEntity=LeadFormResponse::class, mappedBy="leadFormResponsePosition", cascade={"persist", "remove"})
  32.      */
  33.     private $leadFormResponse;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=LeadFormResponsePositionValue::class, mappedBy="leadFormResponsePosition", cascade={"persist", "remove"}, orphanRemoval=true)
  36.      */
  37.     private $leadFormResponsePositionValues;
  38.     /**
  39.      * @ORM\Column(type="boolean", nullable=true)
  40.      */
  41.     private $otherOption;
  42.     /**
  43.      * @ORM\Column(type="boolean", nullable=true)
  44.      */
  45.     private $hidePortalPositions;
  46.     /**
  47.      * @ORM\OneToOne(targetEntity=NewsletterTemplate::class, mappedBy="leadFormResponsePosition", cascade={"persist", "remove"})
  48.      */
  49.     private $newsletterTemplate;
  50.     public function __construct()
  51.     {
  52.         $this->leadFormResponsePositionValues = new ArrayCollection();
  53.     }
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getIncludePosition(): ?bool
  59.     {
  60.         return $this->includePosition;
  61.     }
  62.     public function setIncludePosition(bool $includePosition): self
  63.     {
  64.         $this->includePosition $includePosition;
  65.         return $this;
  66.     }
  67.     public function getRequired(): ?bool
  68.     {
  69.         return $this->required;
  70.     }
  71.     public function setRequired(bool $required): self
  72.     {
  73.         $this->required $required;
  74.         return $this;
  75.     }
  76.     public function getDisplayedName(): ?string
  77.     {
  78.         return $this->displayedName;
  79.     }
  80.     public function setDisplayedName(?string $displayedName): self
  81.     {
  82.         $this->displayedName $displayedName;
  83.         return $this;
  84.     }
  85.     public function getLeadFormResponse(): ?LeadFormResponse
  86.     {
  87.         return $this->leadFormResponse;
  88.     }
  89.     public function setLeadFormResponse(LeadFormResponse $leadFormResponse): self
  90.     {
  91.         $this->leadFormResponse $leadFormResponse;
  92.         // set the owning side of the relation if necessary
  93.         if ($leadFormResponse->getLeadFormResponsePosition() !== $this) {
  94.             $leadFormResponse->setLeadFormResponsePosition($this);
  95.         }
  96.         return $this;
  97.     }
  98.     /**
  99.      * @return Collection|LeadFormResponsePositionValue[]
  100.      */
  101.     public function getLeadFormResponsePositionValues(): Collection
  102.     {
  103.         return $this->leadFormResponsePositionValues;
  104.     }
  105.     public function addLeadFormResponsePositionValue(LeadFormResponsePositionValue $leadFormResponsePositionValue): self
  106.     {
  107.         if (!$this->leadFormResponsePositionValues->contains($leadFormResponsePositionValue)) {
  108.             $this->leadFormResponsePositionValues[] = $leadFormResponsePositionValue;
  109.             $leadFormResponsePositionValue->setLeadFormResponsePosition($this);
  110.         }
  111.         return $this;
  112.     }
  113.     public function removeLeadFormResponsePositionValue(LeadFormResponsePositionValue $leadFormResponsePositionValue): self
  114.     {
  115.         if ($this->leadFormResponsePositionValues->contains($leadFormResponsePositionValue)) {
  116.             $this->leadFormResponsePositionValues->removeElement($leadFormResponsePositionValue);
  117.             // set the owning side to null (unless already changed)
  118.             if ($leadFormResponsePositionValue->getLeadFormResponsePosition() === $this) {
  119.                 $leadFormResponsePositionValue->setLeadFormResponsePosition(null);
  120.             }
  121.         }
  122.         return $this;
  123.     }
  124.     public function getOtherOption(): ?bool
  125.     {
  126.         return $this->otherOption;
  127.     }
  128.     public function setOtherOption(?bool $otherOption): self
  129.     {
  130.         $this->otherOption $otherOption;
  131.         return $this;
  132.     }
  133.     public function getHidePortalPositions(): ?bool
  134.     {
  135.         return $this->hidePortalPositions;
  136.     }
  137.     public function setHidePortalPositions(?bool $hidePortalPositions): self
  138.     {
  139.         $this->hidePortalPositions $hidePortalPositions;
  140.         return $this;
  141.     }
  142.     public function getNewsletterTemplate(): ?NewsletterTemplate
  143.     {
  144.         return $this->newsletterTemplate;
  145.     }
  146.     public function setNewsletterTemplate(?NewsletterTemplate $newsletterTemplate): self
  147.     {
  148.         $this->newsletterTemplate $newsletterTemplate;
  149.         // set (or unset) the owning side of the relation if necessary
  150.         $newLeadFormResponsePosition null === $newsletterTemplate null $this;
  151.         if ($newsletterTemplate->getLeadFormResponsePosition() !== $newLeadFormResponsePosition) {
  152.             $newsletterTemplate->setLeadFormResponsePosition($newLeadFormResponsePosition);
  153.         }
  154.         return $this;
  155.     }
  156. }