<?php
namespace Cms\ThemeBundle\Entity;
use Cms\CoreBundle\Entity\HtmlOverrides;
use Cms\CoreBundle\Model\HtmlOverridableInterface;
use Cms\CoreBundle\Model\EntityRestoreInterface;
use Cms\CoreBundle\Model\EntityRestoreTrait;
use Cms\TenantBundle\Entity\TenantedEntity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class OuterLayout
* @package Cms\ThemeBundle\Entity
*
* @ORM\Entity(
* repositoryClass = "Cms\ThemeBundle\Doctrine\OuterLayoutRepository"
* )
* @ORM\Table(
* "cms__theme__outer_layout",
* indexes={@ORM\Index(columns={"contents"}, flags={"fulltext"})}
* )
*/
class OuterLayout extends TenantedEntity implements HtmlOverridableInterface, EntityRestoreInterface
{
use OuterLayoutRestoreTrait, EntityRestoreTrait;
/**
* @var string
*
* @ORM\Column(
* type = "string",
* nullable = false
* )
*/
protected $name;
/**
* @var string
*
* @ORM\Column(
* type = "text",
* nullable = true
* )
*/
protected $description;
/**
* @var Template
*
* @ORM\ManyToOne(
* targetEntity = "Template"
* )
* @ORM\JoinColumn(
* name = "template",
* referencedColumnName = "id",
* onDelete = "CASCADE"
* )
*/
protected $template;
/**
* @var string
*
* @ORM\Column(
* type = "string",
* nullable = false
* )
*/
protected $base;
/**
* @var HtmlOverrides
*
* @ORM\Embedded(
* class = "Cms\CoreBundle\Entity\HtmlOverrides",
* columnPrefix = "htmlOverrides_"
* )
*/
protected $htmlOverrides;
/**
* @var bool
*
* @ORM\Column(
* type = "boolean",
* nullable = false,
* options = {
* "default" : 0
* }
* )
*/
protected $intranet = false;
/**
* @var bool
*
* @ORM\Column(
* type = "boolean",
* nullable = false,
* options = {
* "default" : 0
* }
* )
*/
protected $adaFooter = false;
/**
* @inheritDoc
*/
public function __construct()
{
$this->htmlOverrides = new HtmlOverrides();
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @return Template
*/
public function getTemplate()
{
return $this->template;
}
/**
* @return string
*/
public function getBase()
{
return $this->base;
}
/**
* @param string $value
* @return $this
*/
public function setName($value)
{
$this->name = $value;
return $this;
}
/**
* @param string $value
* @return $this
*/
public function setDescription($value)
{
$this->description = $value;
return $this;
}
/**
* @param Template $value
* @return $this
*/
public function setTemplate(Template $value)
{
$this->template = $value;
return $this;
}
/**
* @param string $value
* @return $this
*/
public function setBase($value)
{
$this->base = $value;
return $this;
}
/**
* @return Template
*/
public function getTheme()
{
return $this->getTemplate();
}
/**
* @param Template $value
* @return $this
*/
public function setTheme(Template $value)
{
return $this->setTemplate($value);
}
/**
* @return HtmlOverrides
*/
public function getHtmlOverrides()
{
return $this->htmlOverrides;
}
/**
* {@inheritdoc}
*/
public function getBodyClass()
{
return $this->getHtmlOverrides()->getBodyClass();
}
/**
* {@inheritdoc}
*/
public function getHeadScripts()
{
return $this->getHtmlOverrides()->getHeadScripts();
}
/**
* {@inheritdoc}
*/
public function getTopScripts()
{
return $this->getHtmlOverrides()->getTopScripts();
}
/**
* {@inheritdoc}
*/
public function getBottomScripts()
{
return $this->getHtmlOverrides()->getBottomScripts();
}
/**
* @return bool
*/
public function getIntranet()
{
return ($this->intranet === true);
}
/**
* @param bool $value
* @return $this
*/
public function setIntranet($value)
{
$this->intranet = ($value === true);
return $this;
}
/**
* @return bool
*/
public function getAdaFooter()
{
return ($this->adaFooter === true);
}
/**
* @param bool $value
* @return $this
*/
public function setAdaFooter($value)
{
$this->adaFooter = ($value === true);
return $this;
}
}