src/Entity/FormSite.php line 10

Open in your IDE?
  1. <?php
  2. namespace Acme\SudcmsBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass'Acme\SudcmsBundle\Repository\FormSiteRepository')]
  7. class FormSite
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length100)]
  14.     private $name;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $link;
  17.     #[ORM\Column(type'text'nullabletrue)]
  18.     private $description;
  19.     #[ORM\Column(type'datetime')]
  20.     private $creationDatetime;
  21.     #[ORM\OneToMany(targetEntity'Acme\SudcmsBundle\Entity\FormAdresses'mappedBy'formSite')]
  22.     private $formAdresses;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $fromFirstname;
  25.     #[ORM\Column(type'string'length255nullabletrue)]
  26.     private $fromLastname;
  27.     #[ORM\Column(type'string'length255nullabletrue)]
  28.     private $fromEmail;
  29.     #[ORM\Column(type'integer')]
  30.     private $siteUid;
  31.     #[ORM\Column(type'string'length2)]
  32.     private $siteLang;
  33.     #[ORM\Column(type'string'length255)]
  34.     private $subject;
  35.     #[ORM\Column(type'string'length255columnDefinition"enum('file', 'make','notification')"options: ['default' => 'file'])]
  36.     private $type;
  37.     public function __construct()
  38.     {
  39.         $this->formAdresses = new ArrayCollection();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getName(): ?string
  46.     {
  47.         return $this->name;
  48.     }
  49.     public function setName(string $name): self
  50.     {
  51.         $this->name $name;
  52.         return $this;
  53.     }
  54.     public function getLink(): ?string
  55.     {
  56.         return $this->link;
  57.     }
  58.     public function setLink(?string $link): self
  59.     {
  60.         $this->link $link;
  61.         return $this;
  62.     }
  63.     public function getDescription(): ?string
  64.     {
  65.         return $this->description;
  66.     }
  67.     public function setDescription(?string $description): self
  68.     {
  69.         $this->description $description;
  70.         return $this;
  71.     }
  72.     public function getCreationDatetime(): ?\DateTimeInterface
  73.     {
  74.         return $this->creationDatetime;
  75.     }
  76.     public function setCreationDatetime(\DateTimeInterface $creationDatetime): self
  77.     {
  78.         $this->creationDatetime $creationDatetime;
  79.         return $this;
  80.     }
  81.     /**
  82.      * @return Collection|FormAdresses[]
  83.      */
  84.     public function getFormAdresses(): Collection
  85.     {
  86.         return $this->formAdresses;
  87.     }
  88.     public function addFormAdress(FormAdresses $formAdress): self
  89.     {
  90.         if (!$this->formAdresses->contains($formAdress)) {
  91.             $this->formAdresses[] = $formAdress;
  92.             $formAdress->setFormSite($this);
  93.         }
  94.         return $this;
  95.     }
  96.     public function removeFormAdress(FormAdresses $formAdress): self
  97.     {
  98.         if ($this->formAdresses->contains($formAdress)) {
  99.             $this->formAdresses->removeElement($formAdress);
  100.             // set the owning side to null (unless already changed)
  101.             if ($formAdress->getFormSite() === $this) {
  102.                 $formAdress->setFormSite(null);
  103.             }
  104.         }
  105.         return $this;
  106.     }
  107.     public function getFromFirstname(): ?string
  108.     {
  109.         return $this->fromFirstname;
  110.     }
  111.     public function setFromFirstname(?string $fromFirstname): self
  112.     {
  113.         $this->fromFirstname $fromFirstname;
  114.         return $this;
  115.     }
  116.     public function getFromLastname(): ?string
  117.     {
  118.         return $this->fromLastname;
  119.     }
  120.     public function setFromLastname(?string $fromLastname): self
  121.     {
  122.         $this->fromLastname $fromLastname;
  123.         return $this;
  124.     }
  125.     public function getFromEmail(): ?string
  126.     {
  127.         return $this->fromEmail;
  128.     }
  129.     public function setFromEmail(string $fromEmail): self
  130.     {
  131.         $this->fromEmail $fromEmail;
  132.         return $this;
  133.     }
  134.     public function getSiteUid(): ?int
  135.     {
  136.         return $this->siteUid;
  137.     }
  138.     public function setSiteUid(int $siteUid): self
  139.     {
  140.         $this->siteUid $siteUid;
  141.         return $this;
  142.     }
  143.     public function getSiteLang(): ?string
  144.     {
  145.         return $this->siteLang;
  146.     }
  147.     public function setSiteLang(string $siteLang): self
  148.     {
  149.         $this->siteLang $siteLang;
  150.         return $this;
  151.     }
  152.     public function getSubject(): ?string
  153.     {
  154.         return $this->subject;
  155.     }
  156.     public function setSubject(?string $subject): self
  157.     {
  158.         $this->subject $subject;
  159.         return $this;
  160.     }
  161.     public function getType(): ?string
  162.     {
  163.         return $this->type;
  164.     }
  165.     public function setType(string $type): self
  166.     {
  167.         $this->type $type;
  168.         return $this;
  169.     }
  170. }