src/Entity/System/CmsLanguage.php line 29

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: Toni Peral <toniperal.a4b@gmail.com>
  5.  * Date: 4/11/20
  6.  * Time: 12:07
  7.  */
  8. namespace App\Entity\System;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Table(
  12.  *       name="ps_cms_lang",
  13.  *       uniqueConstraints={
  14.  *
  15.  *            @ORM\UniqueConstraint(name="uk_cms_lang", columns={"id_cms", "id_lang"}),
  16.  *            @ORM\UniqueConstraint(name="uk_cms_lang_link", columns={"link_rewrite", "id_lang"})
  17.  *       },
  18.  *       indexes={
  19.  *
  20.  *            @ORM\Index(name="link_rewrite", columns={"link_rewrite"}),
  21.  *       }
  22.  * )
  23.  *
  24.  * @ORM\Entity(repositoryClass="App\Repository\System\CmsLanguageRepository")
  25.  */
  26. class CmsLanguage
  27. {
  28.     /**
  29.      * @ORM\Id()
  30.      *
  31.      * @ORM\GeneratedValue(strategy="AUTO")
  32.      *
  33.      * @ORM\Column(type="integer", name="id")
  34.      */
  35.     private int $id;
  36.     /**
  37.      * @var Cms
  38.      *
  39.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Cms", inversedBy="translations")
  40.      *
  41.      * @ORM\JoinColumn(name="id_cms", referencedColumnName="id_cms", nullable=false)
  42.      */
  43.     private $cms;
  44.     /**
  45.      * @var Language
  46.      *
  47.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  48.      *
  49.      * @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang", nullable=false)
  50.      */
  51.     private $language;
  52.     /**
  53.      * @ORM\Column(type="string", length=128)
  54.      */
  55.     private $metaTitle;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      */
  59.     private $metaDescription;
  60.     /**
  61.      * @ORM\Column(type="string", length=128)
  62.      */
  63.     private $name;
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     private $metaKeywords;
  68.     /**
  69.      * @ORM\Column(type="text", nullable=true)
  70.      */
  71.     private $content;
  72.     /**
  73.      * @ORM\Column(type="string", length=255)
  74.      */
  75.     private $linkRewrite;
  76.     /**
  77.      * @ORM\Column(type="string", length=255, nullable=true)
  78.      */
  79.     private $redirect;
  80.     public function getId(): int
  81.     {
  82.         return $this->id;
  83.     }
  84.     /**
  85.      * @param Cms $cms
  86.      *
  87.      * @return $this
  88.      */
  89.     public function setCms(Cms $cms): self
  90.     {
  91.         $this->cms $cms;
  92.         return $this;
  93.     }
  94.     /**
  95.      * @return Cms
  96.      */
  97.     public function getCms(): Cms
  98.     {
  99.         return $this->cms;
  100.     }
  101.     /**
  102.      * @return Language|null
  103.      */
  104.     public function getLanguage(): ?Language
  105.     {
  106.         return $this->language;
  107.     }
  108.     /**
  109.      * @param Language|null $language
  110.      *
  111.      * @return $this
  112.      */
  113.     public function setLanguage(?Language $language): self
  114.     {
  115.         $this->language $language;
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return string|null
  120.      */
  121.     public function getMetaTitle(): ?string
  122.     {
  123.         return $this->metaTitle;
  124.     }
  125.     /**
  126.      * @param string $metaTitle
  127.      *
  128.      * @return $this
  129.      */
  130.     public function setMetaTitle(string $metaTitle): self
  131.     {
  132.         $this->metaTitle $metaTitle;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @return string|null
  137.      */
  138.     public function getMetaDescription(): ?string
  139.     {
  140.         return $this->metaDescription;
  141.     }
  142.     /**
  143.      * @param string|null $metaDescription
  144.      *
  145.      * @return $this
  146.      */
  147.     public function setMetaDescription(?string $metaDescription): self
  148.     {
  149.         $this->metaDescription $metaDescription;
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return string|null
  154.      */
  155.     public function getName(): ?string
  156.     {
  157.         return $this->name;
  158.     }
  159.     /**
  160.      * @param string $name
  161.      *
  162.      * @return $this
  163.      */
  164.     public function setName(string $name): self
  165.     {
  166.         $this->name $name;
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return string|null
  171.      */
  172.     public function getMetaKeywords(): ?string
  173.     {
  174.         return $this->metaKeywords;
  175.     }
  176.     /**
  177.      * @param string|null $metaKeywords
  178.      *
  179.      * @return $this
  180.      */
  181.     public function setMetaKeywords(?string $metaKeywords): self
  182.     {
  183.         $this->metaKeywords $metaKeywords;
  184.         return $this;
  185.     }
  186.     /**
  187.      * @return string|null
  188.      */
  189.     public function getContent(): ?string
  190.     {
  191.         return $this->content;
  192.     }
  193.     /**
  194.      * @param string|null $content
  195.      *
  196.      * @return $this
  197.      */
  198.     public function setContent(?string $content): self
  199.     {
  200.         $this->content $content;
  201.         return $this;
  202.     }
  203.     /**
  204.      * @return string|null
  205.      */
  206.     public function getLinkRewrite(): ?string
  207.     {
  208.         return $this->linkRewrite;
  209.     }
  210.     /**
  211.      * @param string $linkRewrite
  212.      *
  213.      * @return $this
  214.      */
  215.     public function setLinkRewrite(string $linkRewrite): self
  216.     {
  217.         $this->linkRewrite $linkRewrite;
  218.         return $this;
  219.     }
  220.     /**
  221.      * @return string|null
  222.      */
  223.     public function getRedirect(): ?string
  224.     {
  225.         return $this->redirect;
  226.     }
  227.     /**
  228.      * @param string|null $redirect
  229.      *
  230.      * @return $this
  231.      */
  232.     public function setRedirect(?string $redirect): self
  233.     {
  234.         $this->redirect $redirect;
  235.         return $this;
  236.     }
  237. }