<?php
namespace App\Entity\System;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* CoreUrlRewrite
*
* @ORM\Table(name="core_url_rewrite")
*
* @ORM\Entity(repositoryClass="App\Repository\System\CoreUrlRewriteRepository")
*/
class CoreUrlRewrite
{
/**
* @var int
*
* @ORM\Column(name="url_rewrite_id", type="integer")
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="request_path", type="string", length=255, nullable=true)
*/
private $requestPath;
/**
* @var string
*
* @ORM\Column(name="target_path", type="string", length=255, nullable=true)
*/
private $targetPath;
/**
* @var Product|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="coreUrlRewrites")
*
* @ORM\JoinColumn(name="product_id", nullable=true, referencedColumnName="id_product")
*/
private $product;
/**
* @var Language|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
*
* @ORM\JoinColumn(name="id_lang", nullable=true, referencedColumnName="id_lang")
*/
private $language;
/**
* @var CoreUrlRewrite|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\CoreUrlRewrite", inversedBy="redirectedFrom")
*
* @ORM\JoinColumn(nullable=true, name="id_core_url_rewrite_redirect", referencedColumnName="url_rewrite_id")
*/
private $redirectsTo;
/**
* @var CoreUrlRewrite[]|ArrayCollection
*
* @ORM\OneToMany(targetEntity="App\Entity\System\CoreUrlRewrite", mappedBy="redirectsTo")
*/
private $redirectedFrom;
/**
* @var Category|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Category")
*
* @ORM\JoinColumn(name="category_id", nullable=true, referencedColumnName="id_category")
*/
private $category;
/**
* @var Taxonomy|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Taxonomy")
*
* @ORM\JoinColumn(name="taxonomy_id", nullable=true, referencedColumnName="id")
*/
private $taxonomy;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @return string
*/
public function getRequestPath(): string
{
return $this->requestPath;
}
/**
* @param string $requestPath
*
* @return CoreUrlRewrite
*/
public function setRequestPath(string $requestPath): CoreUrlRewrite
{
$this->requestPath = $requestPath;
return $this;
}
/**
* @return string
*/
public function getTargetPath(): string
{
return $this->targetPath;
}
/**
* @param string $targetPath
*
* @return CoreUrlRewrite
*/
public function setTargetPath(string $targetPath): CoreUrlRewrite
{
$this->targetPath = $targetPath;
return $this;
}
/**
* @return Product|null
*/
public function getProduct(): ?Product
{
return $this->product;
}
/**
* @param Product|null $product
*
* @return CoreUrlRewrite
*/
public function setProduct(?Product $product): CoreUrlRewrite
{
$this->product = $product;
return $this;
}
/**
* @return Language|null
*/
public function getLanguage(): ?Language
{
return $this->language;
}
/**
* @param Language|null $language
*
* @return CoreUrlRewrite
*/
public function setLanguage(?Language $language): CoreUrlRewrite
{
$this->language = $language;
return $this;
}
/**
* @return CoreUrlRewrite|null
*/
public function getRedirectsTo(): ?CoreUrlRewrite
{
return $this->redirectsTo;
}
/**
* @param CoreUrlRewrite|null $redirectsTo
*
* @return CoreUrlRewrite
*/
public function setRedirectsTo(?CoreUrlRewrite $redirectsTo): CoreUrlRewrite
{
$this->redirectsTo = $redirectsTo;
return $this;
}
/**
* @return CoreUrlRewrite[]|ArrayCollection
*/
public function getRedirectedFrom()
{
return $this->redirectedFrom;
}
/**
* @param CoreUrlRewrite[]|ArrayCollection $redirectedFrom
*
* @return CoreUrlRewrite
*/
public function setRedirectedFrom($redirectedFrom): CoreUrlRewrite
{
$this->redirectedFrom = $redirectedFrom;
return $this;
}
/**
* @return Category|null
*/
public function getCategory(): ?Category
{
return $this->category;
}
/**
* @param Category|null $category
*
* @return CoreUrlRewrite
*/
public function setCategory(?Category $category): CoreUrlRewrite
{
$this->category = $category;
return $this;
}
/**
* @return Taxonomy|null
*/
public function getTaxonomy(): ?Taxonomy
{
return $this->taxonomy;
}
/**
* @param Taxonomy|null $taxonomy
*
* @return CoreUrlRewrite
*/
public function setTaxonomy(?Taxonomy $taxonomy): CoreUrlRewrite
{
$this->taxonomy = $taxonomy;
return $this;
}
public function __construct()
{
$this->redirectedFrom = new ArrayCollection();
}
}