src/Entity/TipoDocumento.php line 17

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  5. use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
  6. /**
  7.  * Alerta
  8.  *
  9.  * @ORM\Table(name="tipo_documento")
  10.  * @ORM\Entity
  11.  */
  12. class TipoDocumento implements TranslatableInterface
  13. {
  14.     use TranslatableTrait;
  15.     
  16.     public function __call($method$args)
  17.     {
  18.         //return $this->proxyCurrentLocaleTranslation($method, $arguments);
  19.         if (!method_exists(self::getTranslationEntityClass(), $method)) {
  20.             $method 'get'ucfirst($method);
  21.         }
  22.         return $this->proxyCurrentLocaleTranslation($method$args);        
  23.     }
  24.     
  25.     
  26.     /**
  27.      * @var integer
  28.      *
  29.      * @ORM\Column(name="id", type="integer")
  30.      * @ORM\Id
  31.      * @ORM\GeneratedValue(strategy="AUTO")
  32.      */
  33.     private $id;
  34.     /**
  35.      * @ORM\Column(type="string")
  36.      */
  37.     private $codigo;
  38.     
  39.     
  40.     public function __toString() 
  41.     {
  42.         return $this->getNombre();
  43.     }
  44.     /**
  45.      * Get id
  46.      *
  47.      * @return integer 
  48.      */
  49.     public function getId()
  50.     {
  51.         return $this->id;
  52.     }
  53.     /**
  54.      * Set codigo
  55.      *
  56.      * @param string $codigo
  57.      * @return TipoDocumento
  58.      */
  59.     public function setCodigo($codigo)
  60.     {
  61.         $this->codigo $codigo;
  62.         return $this;
  63.     }
  64.     /**
  65.      * Get codigo
  66.      *
  67.      * @return integer 
  68.      */
  69.     public function getCodigo()
  70.     {
  71.         return $this->codigo;
  72.     }
  73. }