src/Entity/Contact.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Represnete les contacts
  6.  * @ORM\Entity()
  7.  */
  8. class Contact extends AbstractPerson
  9. {
  10.     public function __toString()
  11.     {
  12.         return (string) $this->firstname;
  13.     }
  14.     /**
  15.      * @ORM\Column(type="string", nullable=true)
  16.      */
  17.     protected $job;
  18.     /**
  19.      * @var Contact|null
  20.      *
  21.      * @ORM\ManyToOne(targetEntity="Site")
  22.      * @ORM\JoinColumn(name="site_id", referencedColumnName="id", onDelete="SET NULL")
  23.      */
  24.     private $site;
  25.     /**
  26.      * @ORM\Column(type="string", nullable=true)
  27.      */
  28.     protected $phoneOther;
  29.     /**
  30.      * @return mixed
  31.      */
  32.     public function getJob()
  33.     {
  34.         return $this->job;
  35.     }
  36.     /**
  37.      * @param mixed $job
  38.      */
  39.     public function setJob($job): void
  40.     {
  41.         $this->job $job;
  42.     }
  43.     /**
  44.      * @return Contact|null
  45.      */
  46.     public function getSite(): ?Site
  47.     {
  48.         return $this->site;
  49.     }
  50.     /**
  51.      * @param Site|null $site
  52.      */
  53.     public function setSite($site): void
  54.     {
  55.         $this->site $site;
  56.     }
  57.     /**
  58.      * @return mixed
  59.      */
  60.     public function getPhoneOther()
  61.     {
  62.         return $this->phoneOther;
  63.     }
  64.     /**
  65.      * @param mixed $phoneOther
  66.      */
  67.     public function setPhoneOther($phoneOther): void
  68.     {
  69.         $this->phoneOther $phoneOther;
  70.     }
  71. }