src/Entity/BannerItemTranslation.php line 17

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  6. use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
  7. /**
  8.  * MenuItemTranslation
  9.  *
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="banner_item_translation")
  12.  */
  13. class BannerItemTranslation implements TranslationInterface
  14. {
  15.     use TranslationTrait;
  16.     
  17.     
  18.      /**
  19.      * @var integer
  20.      *
  21.      * @ORM\Column(name="id", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     protected $id;    
  26.     
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="titulo", type="string", length=255, nullable=true)
  31.      */
  32.     protected $titulo;
  33.     
  34.   
  35.     /**
  36.      * @var string
  37.      *
  38.      * @ORM\Column(name="url", type="string", length=255, nullable=true)
  39.      */
  40.     protected $url;        
  41.     
  42.     /**
  43.      * @var text
  44.      *
  45.      * @ORM\Column(name="texto", type="text", nullable=true)
  46.      */
  47.     protected $texto;   
  48.     
  49.     /**
  50.      * @var text
  51.      *
  52.      * @ORM\Column(name="codigo", type="text", nullable=true)
  53.      */
  54.     protected $codigo;     
  55.    
  56.     
  57.     public function __toString()
  58.     {
  59.         if ($this->titulo)
  60.             return $this->titulo;
  61.         else
  62.             return "na";
  63.     }
  64.     
  65.     /**
  66.      * Set titulo
  67.      *
  68.      * @param string $titulo
  69.      * @return BannerItemTranslation
  70.      */
  71.     public function setTitulo($titulo)
  72.     {
  73.         $this->titulo $titulo;
  74.     
  75.         return $this;
  76.     }
  77.     /**
  78.      * Get titulo
  79.      *
  80.      * @return string 
  81.      */
  82.     public function getTitulo()
  83.     {
  84.         return $this->titulo;
  85.     }    
  86.     
  87.  
  88.         
  89.         
  90.     /**
  91.      * Set url
  92.      *
  93.      * @param string $url
  94.      * @return BannerItemTranslation
  95.      */
  96.     public function setUrl($url)
  97.     {
  98.         $this->url $url;
  99.     
  100.         return $this;
  101.     }
  102.     /**
  103.      * Get url
  104.      *
  105.      * @return string 
  106.      */
  107.     public function getUrl()
  108.     {
  109.         return $this->url;
  110.     }    
  111.             
  112.     
  113.     /**
  114.      * Set texto
  115.      *
  116.      * @param string $texto
  117.      * @return BannerItemTranslation
  118.      */
  119.     public function setTexto($texto)
  120.     {
  121.         $this->texto $texto;
  122.     
  123.         return $this;
  124.     }
  125.     /**
  126.      * Get texto
  127.      *
  128.      * @return string 
  129.      */
  130.     public function getTexto()
  131.     {
  132.         return $this->texto;
  133.     }
  134.     
  135.   
  136.     
  137.     /**
  138.      * Set codigo
  139.      *
  140.      * @param string $codigo
  141.      * @return BannerItemTranslation
  142.      */
  143.     public function setCodigo($codigo)
  144.     {
  145.         $this->codigo $codigo;
  146.     
  147.         return $this;
  148.     }
  149.     /**
  150.      * Get codigo
  151.      *
  152.      * @return string 
  153.      */
  154.     public function getCodigo()
  155.     {
  156.         return $this->codigo;
  157.     }        
  158.    
  159. }