src/Entity/Servicio.php line 18

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  7. use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
  8. /**
  9.  * Servicio
  10.  *
  11.  * @ORM\Table(name="servicio")
  12.  * @ORM\Entity
  13.  */
  14. class Servicio implements TranslatableInterface
  15. {
  16.     use TranslatableTrait;
  17.     
  18.     /**
  19.      * @var integer
  20.      *
  21.      * @ORM\Column(name="id", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="altBanner", type="string", length=255, nullable=true)
  30.      *
  31.      */
  32.     private $altBanner;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="alt", type="string", length=255, nullable=true)
  37.      */
  38.     private $alt;
  39.     /**
  40.      * @var string
  41.      *
  42.      * @ORM\Column(name="icono", type="string", length=255,nullable=true)
  43.      */
  44.     private $icono;
  45.     /**
  46.      * @ORM\ManyToMany(targetEntity="Oficina", mappedBy="servicios")
  47.      */
  48.     private $oficinas;
  49.     
  50.     public function __call($method$args)
  51.     {
  52.         //return $this->proxyCurrentLocaleTranslation($method, $arguments);
  53.         if (!method_exists(self::getTranslationEntityClass(), $method)) {
  54.             $method 'get'ucfirst($method);
  55.         }
  56.         return $this->proxyCurrentLocaleTranslation($method$args);        
  57.     }
  58.     public function __construct() {
  59.         
  60.     }
  61.     /**
  62.      * Get id
  63.      *
  64.      * @return integer 
  65.      */
  66.     public function getId()
  67.     {
  68.         return $this->id;
  69.     }
  70.     /**
  71.      * Set icono
  72.      *
  73.      * @param string $icono
  74.      * @return Servicio
  75.      */
  76.     public function setIcono($icono)
  77.     {
  78.         $this->icono $icono;
  79.         return $this;
  80.     }
  81.     /**
  82.      * Get icono
  83.      *
  84.      * @return string 
  85.      */
  86.     public function getIcono()
  87.     {
  88.         return $this->icono;
  89.     }
  90.     public function __toString(){
  91.         return $this->getTexto();
  92.     }
  93.     /**
  94.      * Get alt
  95.      *
  96.      * @return string
  97.      */
  98.     public function getAlt(){
  99.         return $this->alt;
  100.     }
  101.     /**
  102.      * Set alt
  103.      * @param string $alt
  104.      * @return Servicio
  105.      */
  106.     public function setAlt($alt){
  107.         $this->alt$alt;
  108.         return $this;
  109.     }
  110.     /**
  111.      * Get altBanner
  112.      *
  113.      * @return string
  114.      */
  115.     public function getAltBanner(){
  116.         return $this->altBanner;
  117.     }
  118.     /**
  119.      * Set altBanner
  120.      * @param string $altBanner
  121.      * @return DivisaIdioma
  122.      */
  123.     public function setAltBanner($altBanner){
  124.         $this->altBanner $altBanner;
  125.         return $this;
  126.     }
  127. }