src/CasinoBundle/Entity/Link.php line 27

Open in your IDE?
  1. <?php
  2. namespace App\CasinoBundle\Entity;
  3. use App\CmsBundle\Entity\FileTrait;
  4. use App\CmsBundle\Entity\TimeStampedTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\CmsBundle\Entity\PositionTrait;
  7. use App\CmsBundle\Entity\Site;
  8. /**
  9.  * @ORM\Entity(
  10.  *     repositoryClass="App\CasinoBundle\Repository\LinkRepository"
  11.  * )
  12.  * @ORM\Table(
  13.  *     name="link",
  14.  *     indexes={
  15.  *         @ORM\Index(name="link_page_path_index", columns={"page_path"}),
  16.  *         @ORM\Index(name="link_position_index", columns={"position"}),
  17.  *         @ORM\Index(name="link_template_index", columns={"template"})
  18.  *     },
  19.  *     uniqueConstraints={
  20.  *         @ORM\UniqueConstraint(name="links_uindex", columns={"site_id","title","link_path","page_path"})
  21.  *     }
  22.  * )
  23.  * @ORM\HasLifecycleCallbacks()
  24.  */
  25. class Link
  26. {
  27.     use PositionTraitFileTraitTimeStampedTrait;
  28.     /**
  29.      * @ORM\Id()
  30.      * @ORM\GeneratedValue()
  31.      * @ORM\Column(type="integer")
  32.      */
  33.     private $id;
  34.     /**
  35.      * @ORM\Column(type="string", length=255)
  36.      */
  37.     private $title;
  38.     /**
  39.      * @ORM\Column(type="string", length=255)
  40.      */
  41.     private $linkPath;
  42.     /**
  43.      * @ORM\Column(type="string", length=255)
  44.      */
  45.     private $pagePath;
  46.     /**
  47.      * @ORM\Column(type="string", length=255, nullable=true)
  48.      */
  49.     private $template;
  50.     /**
  51.      * @ORM\Column(type="text", nullable=true)
  52.      */
  53.     private $data;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Site")
  56.      * @ORM\JoinColumn(nullable=false)
  57.      */
  58.     private $site;
  59.     public function getId(): ?int
  60.     {
  61.         return $this->id;
  62.     }
  63.     public function getTitle(): ?string
  64.     {
  65.         return $this->title;
  66.     }
  67.     public function setTitle(string $title): self
  68.     {
  69.         $this->title $title;
  70.         return $this;
  71.     }
  72.     public function getSite(): ?Site
  73.     {
  74.         return $this->site;
  75.     }
  76.     public function setSite(?Site $site): self
  77.     {
  78.         $this->site $site;
  79.         return $this;
  80.     }
  81.     public function getLinkPath(): ?string
  82.     {
  83.         return $this->linkPath;
  84.     }
  85.     public function setLinkPath(string $linkPath): self
  86.     {
  87.         $this->linkPath $linkPath;
  88.         return $this;
  89.     }
  90.     public function getPagePath(): ?string
  91.     {
  92.         return $this->pagePath;
  93.     }
  94.     public function setPagePath(string $pagePath): self
  95.     {
  96.         $this->pagePath $pagePath;
  97.         return $this;
  98.     }
  99.     public function getTemplate() : ?string
  100.     {
  101.         return $this->template;
  102.     }
  103.     public function setTemplate(?string $template): self
  104.     {
  105.         $this->template $template;
  106.         return $this;
  107.     }
  108.     public function getData() : ?string
  109.     {
  110.         return $this->data;
  111.     }
  112.     public function setData(?string $data): self
  113.     {
  114.         $this->data $data;
  115.         return $this;
  116.     }
  117. }