src/Entity/System/CoreUrlRewrite.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * CoreUrlRewrite
  7.  *
  8.  * @ORM\Table(name="core_url_rewrite")
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\Repository\System\CoreUrlRewriteRepository")
  11.  */
  12. class CoreUrlRewrite
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="url_rewrite_id", type="integer")
  18.      *
  19.      * @ORM\Id
  20.      *
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Column(name="request_path", type="string", length=255, nullable=true)
  28.      */
  29.     private $requestPath;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="target_path", type="string", length=255, nullable=true)
  34.      */
  35.     private $targetPath;
  36.     /**
  37.      * @var Product|null
  38.      *
  39.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="coreUrlRewrites")
  40.      *
  41.      * @ORM\JoinColumn(name="product_id", nullable=true, referencedColumnName="id_product")
  42.      */
  43.     private $product;
  44.     /**
  45.      * @var Language|null
  46.      *
  47.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  48.      *
  49.      * @ORM\JoinColumn(name="id_lang", nullable=true, referencedColumnName="id_lang")
  50.      */
  51.     private $language;
  52.     /**
  53.      * @var CoreUrlRewrite|null
  54.      *
  55.      * @ORM\ManyToOne(targetEntity="App\Entity\System\CoreUrlRewrite", inversedBy="redirectedFrom")
  56.      *
  57.      * @ORM\JoinColumn(nullable=true, name="id_core_url_rewrite_redirect", referencedColumnName="url_rewrite_id")
  58.      */
  59.     private $redirectsTo;
  60.     /**
  61.      * @var CoreUrlRewrite[]|ArrayCollection
  62.      *
  63.      * @ORM\OneToMany(targetEntity="App\Entity\System\CoreUrlRewrite", mappedBy="redirectsTo")
  64.      */
  65.     private $redirectedFrom;
  66.     /**
  67.      * @var Category|null
  68.      *
  69.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Category")
  70.      *
  71.      * @ORM\JoinColumn(name="category_id", nullable=true, referencedColumnName="id_category")
  72.      */
  73.     private $category;
  74.     /**
  75.      * @var Taxonomy|null
  76.      *
  77.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Taxonomy")
  78.      *
  79.      * @ORM\JoinColumn(name="taxonomy_id", nullable=true, referencedColumnName="id")
  80.      */
  81.     private $taxonomy;
  82.     /**
  83.      * @return int
  84.      */
  85.     public function getId(): int
  86.     {
  87.         return $this->id;
  88.     }
  89.     /**
  90.      * @return string
  91.      */
  92.     public function getRequestPath(): string
  93.     {
  94.         return $this->requestPath;
  95.     }
  96.     /**
  97.      * @param string $requestPath
  98.      *
  99.      * @return CoreUrlRewrite
  100.      */
  101.     public function setRequestPath(string $requestPath): CoreUrlRewrite
  102.     {
  103.         $this->requestPath $requestPath;
  104.         return $this;
  105.     }
  106.     /**
  107.      * @return string
  108.      */
  109.     public function getTargetPath(): string
  110.     {
  111.         return $this->targetPath;
  112.     }
  113.     /**
  114.      * @param string $targetPath
  115.      *
  116.      * @return CoreUrlRewrite
  117.      */
  118.     public function setTargetPath(string $targetPath): CoreUrlRewrite
  119.     {
  120.         $this->targetPath $targetPath;
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return Product|null
  125.      */
  126.     public function getProduct(): ?Product
  127.     {
  128.         return $this->product;
  129.     }
  130.     /**
  131.      * @param Product|null $product
  132.      *
  133.      * @return CoreUrlRewrite
  134.      */
  135.     public function setProduct(?Product $product): CoreUrlRewrite
  136.     {
  137.         $this->product $product;
  138.         return $this;
  139.     }
  140.     /**
  141.      * @return Language|null
  142.      */
  143.     public function getLanguage(): ?Language
  144.     {
  145.         return $this->language;
  146.     }
  147.     /**
  148.      * @param Language|null $language
  149.      *
  150.      * @return CoreUrlRewrite
  151.      */
  152.     public function setLanguage(?Language $language): CoreUrlRewrite
  153.     {
  154.         $this->language $language;
  155.         return $this;
  156.     }
  157.     /**
  158.      * @return CoreUrlRewrite|null
  159.      */
  160.     public function getRedirectsTo(): ?CoreUrlRewrite
  161.     {
  162.         return $this->redirectsTo;
  163.     }
  164.     /**
  165.      * @param CoreUrlRewrite|null $redirectsTo
  166.      *
  167.      * @return CoreUrlRewrite
  168.      */
  169.     public function setRedirectsTo(?CoreUrlRewrite $redirectsTo): CoreUrlRewrite
  170.     {
  171.         $this->redirectsTo $redirectsTo;
  172.         return $this;
  173.     }
  174.     /**
  175.      * @return CoreUrlRewrite[]|ArrayCollection
  176.      */
  177.     public function getRedirectedFrom()
  178.     {
  179.         return $this->redirectedFrom;
  180.     }
  181.     /**
  182.      * @param CoreUrlRewrite[]|ArrayCollection $redirectedFrom
  183.      *
  184.      * @return CoreUrlRewrite
  185.      */
  186.     public function setRedirectedFrom($redirectedFrom): CoreUrlRewrite
  187.     {
  188.         $this->redirectedFrom $redirectedFrom;
  189.         return $this;
  190.     }
  191.     /**
  192.      * @return Category|null
  193.      */
  194.     public function getCategory(): ?Category
  195.     {
  196.         return $this->category;
  197.     }
  198.     /**
  199.      * @param Category|null $category
  200.      *
  201.      * @return CoreUrlRewrite
  202.      */
  203.     public function setCategory(?Category $category): CoreUrlRewrite
  204.     {
  205.         $this->category $category;
  206.         return $this;
  207.     }
  208.     /**
  209.      * @return Taxonomy|null
  210.      */
  211.     public function getTaxonomy(): ?Taxonomy
  212.     {
  213.         return $this->taxonomy;
  214.     }
  215.     /**
  216.      * @param Taxonomy|null $taxonomy
  217.      *
  218.      * @return CoreUrlRewrite
  219.      */
  220.     public function setTaxonomy(?Taxonomy $taxonomy): CoreUrlRewrite
  221.     {
  222.         $this->taxonomy $taxonomy;
  223.         return $this;
  224.     }
  225.     public function __construct()
  226.     {
  227.         $this->redirectedFrom = new ArrayCollection();
  228.     }
  229. }