src/Cms/ThemeBundle/Entity/OuterLayout.php line 23

Open in your IDE?
  1. <?php
  2. namespace Cms\ThemeBundle\Entity;
  3. use Cms\CoreBundle\Entity\HtmlOverrides;
  4. use Cms\CoreBundle\Model\HtmlOverridableInterface;
  5. use Cms\CoreBundle\Model\EntityRestoreInterface;
  6. use Cms\CoreBundle\Model\EntityRestoreTrait;
  7. use Cms\TenantBundle\Entity\TenantedEntity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * Class OuterLayout
  11.  * @package Cms\ThemeBundle\Entity
  12.  *
  13.  * @ORM\Entity(
  14.  *  repositoryClass = "Cms\ThemeBundle\Doctrine\OuterLayoutRepository"
  15.  * )
  16.  * @ORM\Table(
  17.  *  "cms__theme__outer_layout"
  18.  * )
  19.  */
  20. class OuterLayout extends TenantedEntity implements HtmlOverridableInterfaceEntityRestoreInterface
  21. {
  22.     use OuterLayoutRestoreTraitEntityRestoreTrait;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(
  27.      *  type = "string",
  28.      *  nullable = false
  29.      * )
  30.      */
  31.     protected $name;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(
  36.      *  type = "text",
  37.      *  nullable = true
  38.      * )
  39.      */
  40.     protected $description;
  41.     /**
  42.      * @var Template
  43.      *
  44.      * @ORM\ManyToOne(
  45.      *  targetEntity = "Template"
  46.      * )
  47.      * @ORM\JoinColumn(
  48.      *  name = "template",
  49.      *  referencedColumnName = "id",
  50.      *  onDelete = "CASCADE"
  51.      * )
  52.      */
  53.     protected $template;
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(
  58.      *  type = "string",
  59.      *  nullable = false
  60.      * )
  61.      */
  62.     protected $base;
  63.     
  64.     /**
  65.      * @var HtmlOverrides
  66.      *
  67.      * @ORM\Embedded(
  68.      *     class = "Cms\CoreBundle\Entity\HtmlOverrides",
  69.      *     columnPrefix = "htmlOverrides_"
  70.      * )
  71.      */
  72.     protected $htmlOverrides;
  73.     /**
  74.      * @var bool
  75.      *
  76.      * @ORM\Column(
  77.      *     type = "boolean",
  78.      *     nullable = false,
  79.      *     options = {
  80.      *         "default" : 0
  81.      *     }
  82.      * )
  83.      */
  84.     protected $intranet false;
  85.     /**
  86.      * @var bool
  87.      *
  88.      * @ORM\Column(
  89.      *     type = "boolean",
  90.      *     nullable = false,
  91.      *     options = {
  92.      *         "default" : 0
  93.      *     }
  94.      * )
  95.      */
  96.     protected $adaFooter false;
  97.     /**
  98.      * @inheritDoc
  99.      */
  100.     public function __construct()
  101.     {
  102.         $this->htmlOverrides = new HtmlOverrides();
  103.     }
  104.     /**
  105.      * @return string
  106.      */
  107.     public function getName()
  108.     {
  109.         return $this->name;
  110.     }
  111.     /**
  112.      * @return string
  113.      */
  114.     public function getDescription()
  115.     {
  116.         return $this->description;
  117.     }
  118.     /**
  119.      * @return Template
  120.      */
  121.     public function getTemplate()
  122.     {
  123.         return $this->template;
  124.     }
  125.     /**
  126.      * @return string
  127.      */
  128.     public function getBase()
  129.     {
  130.         return $this->base;
  131.     }
  132.     /**
  133.      * @param string $value
  134.      * @return $this
  135.      */
  136.     public function setName($value)
  137.     {
  138.         $this->name $value;
  139.         return $this;
  140.     }
  141.     /**
  142.      * @param string $value
  143.      * @return $this
  144.      */
  145.     public function setDescription($value)
  146.     {
  147.         $this->description $value;
  148.         return $this;
  149.     }
  150.     /**
  151.      * @param Template $value
  152.      * @return $this
  153.      */
  154.     public function setTemplate(Template $value)
  155.     {
  156.         $this->template $value;
  157.         return $this;
  158.     }
  159.     /**
  160.      * @param string $value
  161.      * @return $this
  162.      */
  163.     public function setBase($value)
  164.     {
  165.         $this->base $value;
  166.         return $this;
  167.     }
  168.     /**
  169.      * @return Template
  170.      */
  171.     public function getTheme()
  172.     {
  173.         return $this->getTemplate();
  174.     }
  175.     /**
  176.      * @param Template $value
  177.      * @return $this
  178.      */
  179.     public function setTheme(Template $value)
  180.     {
  181.         return $this->setTemplate($value);
  182.     }
  183.     /**
  184.      * @return HtmlOverrides
  185.      */
  186.     public function getHtmlOverrides()
  187.     {
  188.         return $this->htmlOverrides;
  189.     }
  190.     /**
  191.      * {@inheritdoc}
  192.      */
  193.     public function getBodyClass()
  194.     {
  195.         return $this->getHtmlOverrides()->getBodyClass();
  196.     }
  197.     /**
  198.      * {@inheritdoc}
  199.      */
  200.     public function getHeadScripts()
  201.     {
  202.         return $this->getHtmlOverrides()->getHeadScripts();
  203.     }
  204.     /**
  205.      * {@inheritdoc}
  206.      */
  207.     public function getTopScripts()
  208.     {
  209.         return $this->getHtmlOverrides()->getTopScripts();
  210.     }
  211.     /**
  212.      * {@inheritdoc}
  213.      */
  214.     public function getBottomScripts()
  215.     {
  216.         return $this->getHtmlOverrides()->getBottomScripts();
  217.     }
  218.     /**
  219.      * @return bool
  220.      */
  221.     public function getIntranet()
  222.     {
  223.         return ($this->intranet === true);
  224.     }
  225.     /**
  226.      * @param bool $value
  227.      * @return $this
  228.      */
  229.     public function setIntranet($value)
  230.     {
  231.         $this->intranet = ($value === true);
  232.         return $this;
  233.     }
  234.     /**
  235.      * @return bool
  236.      */
  237.     public function getAdaFooter()
  238.     {
  239.         return ($this->adaFooter === true);
  240.     }
  241.     /**
  242.      * @param bool $value
  243.      * @return $this
  244.      */
  245.     public function setAdaFooter($value)
  246.     {
  247.         $this->adaFooter = ($value === true);
  248.         return $this;
  249.     }
  250. }