src/Entity/Familie.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FamilieRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use App\Entity\Titulatuur;
  8. #[ORM\Entity(repositoryClassFamilieRepository::class)]
  9. class Familie
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne]
  16.     private ?titulatuur $titulatuur null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $naam null;
  19.     #[ORM\Column(length100nullabletrue)]
  20.     private ?string $voorletters null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $padres null;
  23.     #[ORM\Column(length15nullabletrue)]
  24.     private ?string $ppostcode null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $pplaats null;
  27.     #[ORM\Column(length15nullabletrue)]
  28.     private ?string $telefoon null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $email null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $fadres null;
  33.     #[ORM\Column(length15nullabletrue)]
  34.     private ?string $fpostcode null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $fplaats null;
  37.     #[ORM\OneToMany(mappedBy'familie'targetEntityOrder::class)]
  38.     private Collection $orders;
  39.     #[ORM\Column(length15nullabletrue)]
  40.     private ?string $telefoon2 null;
  41.     #[ORM\Column(length255nullabletrue)]
  42.     private ?string $telefoon2_naam null;
  43.     #[ORM\OneToMany(mappedBy'familie'targetEntityProspect::class)]
  44.     private Collection $prospects;
  45.     #[ORM\Column(length255nullabletrue)]
  46.     private ?string $telefoon_naam null;
  47.     public function __construct()
  48.     {
  49.         $this->orders = new ArrayCollection();
  50.         $this->prospects = new ArrayCollection();
  51.     }
  52.     public function __toString()
  53.     {
  54.         if ($this->titulatuur$familie['titulatuur'] = $this->titulatuur;
  55.         if ($this->voorletters$familie['voorletters'] = $this->voorletters;
  56.         if ($this->naam$familie['naam'] = $this->naam;
  57.         if ($this->padres$familie['padres'] = $this->padres;
  58.         if ($this->ppostcode$familie['ppostcode'] = $this->ppostcode;
  59.         if ($this->pplaats$familie['pplaats'] = $this->pplaats;
  60.         if (isset($familie)) {
  61.             return (implode(", "$familie));
  62.         } else
  63.             return '';
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getTitulatuur(): ?titulatuur
  70.     {
  71.         return $this->titulatuur;
  72.     }
  73.     public function setTitulatuur(?titulatuur $titulatuur): self
  74.     {
  75.         $this->titulatuur $titulatuur;
  76.         return $this;
  77.     }
  78.     public function getNaam(): ?string
  79.     {
  80.         return $this->naam;
  81.     }
  82.     public function setNaam(?string $naam): self
  83.     {
  84.         $this->naam $naam;
  85.         return $this;
  86.     }
  87.     public function getVoorletters(): ?string
  88.     {
  89.         return $this->voorletters;
  90.     }
  91.     public function setVoorletters(?string $voorletters): self
  92.     {
  93.         $this->voorletters $voorletters;
  94.         return $this;
  95.     }
  96.     public function getPadres(): ?string
  97.     {
  98.         return $this->padres;
  99.     }
  100.     public function setPadres(?string $padres): self
  101.     {
  102.         $this->padres $padres;
  103.         return $this;
  104.     }
  105.     public function getPpostcode(): ?string
  106.     {
  107.         return $this->ppostcode;
  108.     }
  109.     public function setPpostcode(?string $ppostcode): self
  110.     {
  111.         $this->ppostcode $ppostcode;
  112.         return $this;
  113.     }
  114.     public function getPplaats(): ?string
  115.     {
  116.         return $this->pplaats;
  117.     }
  118.     public function setPplaats(?string $pplaats): self
  119.     {
  120.         $this->pplaats $pplaats;
  121.         return $this;
  122.     }
  123.     public function getTelefoon(): ?string
  124.     {
  125.         return $this->telefoon;
  126.     }
  127.     public function setTelefoon(?string $telefoon): self
  128.     {
  129.         $this->telefoon $telefoon;
  130.         return $this;
  131.     }
  132.     public function getEmail(): ?string
  133.     {
  134.         return $this->email;
  135.     }
  136.     public function setEmail(?string $email): self
  137.     {
  138.         $this->email $email;
  139.         return $this;
  140.     }
  141.     public function getFadres(): ?string
  142.     {
  143.         return $this->fadres;
  144.     }
  145.     public function setFadres(?string $fadres): self
  146.     {
  147.         $this->fadres $fadres;
  148.         return $this;
  149.     }
  150.     public function getFpostcode(): ?string
  151.     {
  152.         return $this->fpostcode;
  153.     }
  154.     public function setFpostcode(?string $fpostcode): self
  155.     {
  156.         $this->fpostcode $fpostcode;
  157.         return $this;
  158.     }
  159.     public function getFplaats(): ?string
  160.     {
  161.         return $this->fplaats;
  162.     }
  163.     public function setFplaats(?string $fplaats): self
  164.     {
  165.         $this->fplaats $fplaats;
  166.         return $this;
  167.     }
  168.     /**
  169.      * @return Collection<int, Order>
  170.      */
  171.     public function getOrders(): Collection
  172.     {
  173.         return $this->orders;
  174.     }
  175.     public function addOrder(Order $order): self
  176.     {
  177.         if (!$this->orders->contains($order)) {
  178.             $this->orders->add($order);
  179.             $order->setFamilie($this);
  180.         }
  181.         return $this;
  182.     }
  183.     public function removeOrder(Order $order): self
  184.     {
  185.         if ($this->orders->removeElement($order)) {
  186.             // set the owning side to null (unless already changed)
  187.             if ($order->getFamilie() === $this) {
  188.                 $order->setFamilie(null);
  189.             }
  190.         }
  191.         return $this;
  192.     }
  193.     public function getTelefoon2(): ?string
  194.     {
  195.         return $this->telefoon2;
  196.     }
  197.     public function setTelefoon2(?string $telefoon2): self
  198.     {
  199.         $this->telefoon2 $telefoon2;
  200.         return $this;
  201.     }
  202.     public function getTelefoon2Naam(): ?string
  203.     {
  204.         return $this->telefoon2_naam;
  205.     }
  206.     public function setTelefoon2Naam(?string $telefoon2_naam): self
  207.     {
  208.         $this->telefoon2_naam $telefoon2_naam;
  209.         return $this;
  210.     }
  211.     /**
  212.      * @return Collection<int, Prospect>
  213.      */
  214.     public function getProspects(): Collection
  215.     {
  216.         return $this->prospects;
  217.     }
  218.     public function addProspect(Prospect $prospect): self
  219.     {
  220.         if (!$this->prospects->contains($prospect)) {
  221.             $this->prospects->add($prospect);
  222.             $prospect->setFamilie($this);
  223.         }
  224.         return $this;
  225.     }
  226.     public function removeProspect(Prospect $prospect): self
  227.     {
  228.         if ($this->prospects->removeElement($prospect)) {
  229.             // set the owning side to null (unless already changed)
  230.             if ($prospect->getFamilie() === $this) {
  231.                 $prospect->setFamilie(null);
  232.             }
  233.         }
  234.         return $this;
  235.     }
  236.     public function getTelefoonNaam(): ?string
  237.     {
  238.         return $this->telefoon_naam;
  239.     }
  240.     public function setTelefoonNaam(?string $telefoon_naam): self
  241.     {
  242.         $this->telefoon_naam $telefoon_naam;
  243.         return $this;
  244.     }
  245. }