src/CmsBundle/Entity/SiteInfo.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\CmsBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * SiteInfo
  6.  *
  7.  * @ORM\Table(
  8.  *     name="site_info",
  9.  *     uniqueConstraints={
  10.  *         @ORM\UniqueConstraint(name="site_info_site_uindex", columns={"site_id"})
  11.  *     }
  12.  * )
  13.  * @ORM\Entity(repositoryClass="App\CmsBundle\Repository\SiteInfoRepository")
  14.  */
  15. class SiteInfo
  16. {
  17.     /**
  18.      * @var int
  19.      *
  20.      * @ORM\Column(name="id", type="integer", nullable=false)
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue()
  23.      */
  24.     private $id;
  25.     /**
  26.      * @ORM\OneToOne(targetEntity="App\CmsBundle\Entity\Site", inversedBy="info")
  27.      * @ORM\JoinColumn(name="site_id", referencedColumnName="id")
  28.      */
  29.     private $site;
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      */
  33.     private $robots null;
  34.     /**
  35.      * @return int
  36.      */
  37.     public function getId(): int
  38.     {
  39.         return $this->id;
  40.     }
  41.     /**
  42.      * @param int $id
  43.      * @return void
  44.      */
  45.     public function setId(int $id): void
  46.     {
  47.         $this->id $id;
  48.     }
  49.     /**
  50.      * @return Site|null
  51.      */
  52.     public function getSite(): ?Site
  53.     {
  54.         return $this->site;
  55.     }
  56.     /**
  57.      * @param Site|null $site
  58.      * @return $this
  59.      */
  60.     public function setSite(?Site $site): self
  61.     {
  62.         $this->site $site;
  63.         return $this;
  64.     }
  65.     /**
  66.      * @param string|null $value
  67.      * @return $this
  68.      */
  69.     public function setRobots(?string $value): self
  70.     {
  71.         $this->robots $value;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return string|null
  76.      */
  77.     public function getRobots(): ?string
  78.     {
  79.         return $this->robots;
  80.     }
  81. }