<?php
namespace Boab\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Boab\CmsBundle\Entity\Route;
/**
* PageRoute
*
* @ORM\Entity
* @ORM\Entity(repositoryClass="Boab\CmsBundle\Repository\RouteRepository")
*/
class PageRoute extends Route implements RouteContentInterface
{
const DEFAULT_CONTROLLER = 'content_controller:showAction';
const CONTENT_TYPE = 'page';
public function getController()
{
return self::DEFAULT_CONTROLLER;
}
public function getContentTypeId()
{
return self::CONTENT_TYPE;
}
/**
* Get contentType
*
* @return string
*/
public function getContentType():?string
{
return self::CONTENT_TYPE;
}
public function setDefaults( array $defauts=[])
{
$defauts = [
'_title' => $this->getTitle(),
'_controller' => $this->getController(),
'_template'=>$this->getTemplate(),
];
$this->addDefaults($defauts);
}
}