src/Cms/ThemeBundle/Entity/TwigSource.php line 19

Open in your IDE?
  1. <?php
  2. namespace Cms\ThemeBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Cms\TenantBundle\Entity\TenantedEntity;
  5. /**
  6.  * Class TwigSource
  7.  * @package Cms\ThemeBundle\TwigSource
  8.  *
  9.  * @ORM\Entity(
  10.  *  repositoryClass = "Cms\ThemeBundle\Doctrine\TwigSourceRepository"
  11.  * )
  12.  * @ORM\Table(
  13.  *  name = "cms__theme__twig_source"
  14.  * )
  15.  */
  16. class TwigSource extends TenantedEntity
  17. {
  18.     /**
  19.      * @var string
  20.      *
  21.      * @ORM\Column(
  22.      *  type = "string",
  23.      *  nullable = false
  24.      * )
  25.      */
  26.     protected $name;
  27.     /**
  28.      * @var Template
  29.      *
  30.      * @ORM\ManyToOne(
  31.      *  targetEntity = "Template"
  32.      * )
  33.      * @ORM\JoinColumn(
  34.      *  name = "template",
  35.      *  referencedColumnName = "id",
  36.      *  onDelete = "CASCADE",
  37.      * )
  38.      */
  39.     protected $template;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(
  44.      *  type = "text",
  45.      *  nullable = false
  46.      * )
  47.      */
  48.     protected $code;
  49.     /**
  50.      * @return string
  51.      */
  52.     public function getName()
  53.     {
  54.         return $this->name;
  55.     }
  56.     /**
  57.      * @return Template
  58.      */
  59.     public function getTemplate()
  60.     {
  61.         return $this->template;
  62.     }
  63.     /**
  64.      * @return string
  65.      */
  66.     public function getCode()
  67.     {
  68.         return $this->code;
  69.     }
  70.     /**
  71.      * @param string $value
  72.      * @return $this
  73.      */
  74.     public function setName($value)
  75.     {
  76.         $this->name $value;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @param Template $template
  81.      * @return $this
  82.      */
  83.     public function setTemplate(Template $template)
  84.     {
  85.         $this->template $template;
  86.         return $this;
  87.     }
  88.     /**
  89.      * @param string $value
  90.      * @return $this
  91.      */
  92.     public function setCode($value)
  93.     {
  94.         $this->code $value;
  95.         return $this;
  96.     }
  97. }