<?php
namespace Cms\ThemeBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Cms\TenantBundle\Entity\TenantedEntity;
/**
* Class TwigSource
* @package Cms\ThemeBundle\TwigSource
*
* @ORM\Entity(
* repositoryClass = "Cms\ThemeBundle\Doctrine\TwigSourceRepository"
* )
* @ORM\Table(
* name = "cms__theme__twig_source"
* )
*/
class TwigSource extends TenantedEntity
{
/**
* @var string
*
* @ORM\Column(
* type = "string",
* nullable = false
* )
*/
protected $name;
/**
* @var Template
*
* @ORM\ManyToOne(
* targetEntity = "Template"
* )
* @ORM\JoinColumn(
* name = "template",
* referencedColumnName = "id",
* onDelete = "CASCADE",
* )
*/
protected $template;
/**
* @var string
*
* @ORM\Column(
* type = "text",
* nullable = false
* )
*/
protected $code;
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @return Template
*/
public function getTemplate()
{
return $this->template;
}
/**
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* @param string $value
* @return $this
*/
public function setName($value)
{
$this->name = $value;
return $this;
}
/**
* @param Template $template
* @return $this
*/
public function setTemplate(Template $template)
{
$this->template = $template;
return $this;
}
/**
* @param string $value
* @return $this
*/
public function setCode($value)
{
$this->code = $value;
return $this;
}
}