<?php
namespace Boab\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* UrlRoute
*
* @ORM\Table(name="route_url")
* @ORM\Entity(repositoryClass="Boab\CmsBundle\Repository\RouteRepository")
*/
class UrlRoute extends Route
{
/**
* @var string
*
* @ORM\Column(name="url", type="string", length=255, precision=0, scale=0, nullable=false, unique=false)
* @Assert\Url(
* message = "The url '{{ value }}' is not a valid url",
* )
*/
private $url;
private $contentType;
/**
* @var string
*
* @ORM\Column(name="permanent", type="boolean", nullable=true)
*/
private $permanent;
public function getController()
{
return 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction';
}
public function setController()
{
}
public function getContentType():?string
{
return '';
}
public function setContentType()
{
}
public function setDefaults( array $defauts=[])
{
$defauts = [
'_controller' => $this->getController(),
'_title' => $this->getTitle(),
'_template'=> $this->getTemplate(),
'path'=> $this->getUrl(),
'permanent'=> $this->getPermanent(),
];
parent::setDefaults($defauts);
}
/**
* Get the value of url
*/
public function getUrl()
{
return $this->url;
}
/**
* Set the value of url
*
* @return self
*/
public function setUrl($url)
{
$this->url = $url;
return $this;
}
/**
* Get the value of permanent
*/
public function getPermanent()
{
return $this->permanent;
}
/**
* Set the value of permanent
*
* @return self
*/
public function setPermanent($permanent)
{
$this->permanent = $permanent;
return $this;
}
}