src/Admin/Entity/StdFriendlyUrl.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Admin\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'std_friendly_url')]
  5. #[ORM\UniqueConstraint(name'friendly_url_index'columns: ['page_id''relation_id''language_code'])]
  6. #[ORM\Entity(repositoryClass'App\Admin\Repository\StdFriendlyUrlRepository')]
  7. class StdFriendlyUrl
  8. {
  9.     #[ORM\Id]
  10.  #[ORM\GeneratedValue]
  11.  #[ORM\Column(type'integer')]
  12.  private $id;
  13.     
  14.     /**
  15.   * @var string
  16.   */
  17.  #[ORM\Column(name'url'type'string'length500uniquetruenullablefalseoptions: ['comment' => 'Url of the page'])]
  18.  private $url;
  19.     /**
  20.      * @var string
  21.      */
  22.     #[ORM\Column(name'language_code'type'string'length2nullablefalseoptions: ['comment' => 'ISO 639 Language code'])]
  23.     private $languageCode;
  24.      /**
  25.   * @var \StdPages
  26.   */
  27.  #[ORM\JoinColumn(name'page_id'referencedColumnName'id')]
  28.  #[ORM\ManyToOne(targetEntity'StdPages')]
  29.  private $pageId;
  30.     
  31.     /**
  32.      * @var \StdPagesPages
  33.      *
  34.      *
  35.      */
  36.     #[ORM\JoinColumn(name'relation_id'referencedColumnName'id')]
  37.     #[ORM\ManyToOne(targetEntity'StdPagesPages')]
  38.     private $relationId;
  39.     
  40.     /**
  41.      * @var json
  42.      */
  43.     #[ORM\Column(name'relation_tree'type'json'nullabletrueoptions: ['comment' => 'Relation tree of the page'])]
  44.     private $relationTree = [];
  45.     /**
  46.      * @var bool
  47.      */
  48.     #[ORM\Column(name'is_canonical'type'boolean'nullablefalseoptions: ['comment' => 'Flag that indicates if the url is canonical'])]
  49.     private $isCanonical;
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getLanguageCode(): ?string
  55.     {
  56.         return $this->languageCode;
  57.     }
  58.     public function setLanguageCode(string $languageCode): self
  59.     {
  60.         $this->languageCode $languageCode;
  61.         return $this;
  62.     }
  63.     public function getUrl(): ?string
  64.     {
  65.         return $this->url;
  66.     }
  67.     public function setUrl(string $url): self
  68.     {
  69.         $this->url $url;
  70.         return $this;
  71.     }
  72.     
  73.     public function getPageId(): ?StdPages
  74.     {
  75.         return $this->pageId;
  76.     }
  77.     public function setPageId(?StdPages $pageId): self
  78.     {
  79.         $this->pageId $pageId;
  80.         return $this;
  81.     }
  82.     public function getRelationId(): ?StdPagesPages
  83.     {
  84.         return $this->relationId;
  85.     }
  86.     public function setRelationId(?StdPagesPages $relationId): self
  87.     {
  88.         $this->relationId $relationId;
  89.         return $this;
  90.     }
  91.     
  92.     public function getRelationTree(): ?Array
  93.     {
  94.         return $this->relationTree;
  95.     }
  96.     public function setRelationTree(Array $relationTree): self
  97.     {
  98.         $this->relationTree $relationTree;
  99.         return $this;
  100.     }
  101.     public function getIsCanonical(): ?bool
  102.     {
  103.         return $this->isCanonical;
  104.     }
  105.     public function setIsCanonical(bool $isCanonical): self
  106.     {
  107.         $this->isCanonical $isCanonical;
  108.         return $this;
  109.     }
  110. }