vendor/gedmo/doctrine-extensions/src/Translator/Entity/Translation.php line 27

  1. <?php
  2. /*
  3.  * This file is part of the Doctrine Behavioral Extensions package.
  4.  * (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org
  5.  * For the full copyright and license information, please view the LICENSE
  6.  * file that was distributed with this source code.
  7.  */
  8. namespace Gedmo\Translator\Entity;
  9. use Doctrine\DBAL\Types\Types;
  10. use Doctrine\ORM\Mapping\Column;
  11. use Doctrine\ORM\Mapping\GeneratedValue;
  12. use Doctrine\ORM\Mapping\Id;
  13. use Doctrine\ORM\Mapping\MappedSuperclass;
  14. use Gedmo\Translator\Translation as BaseTranslation;
  15. /**
  16.  * Entity translation class.
  17.  *
  18.  * @author Konstantin Kudryashov <ever.zet@gmail.com>
  19.  *
  20.  * @MappedSuperclass
  21.  */
  22. #[MappedSuperclass]
  23. abstract class Translation extends BaseTranslation
  24. {
  25.     /**
  26.      * @var int
  27.      *
  28.      * @Column(type="integer")
  29.      * @Id
  30.      * @GeneratedValue
  31.      */
  32.     #[Column(typeTypes::INTEGER)]
  33.     #[Id]
  34.     #[GeneratedValue]
  35.     protected $id;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @Column(type="string", length=8)
  40.      */
  41.     #[Column(typeTypes::STRINGlength8)]
  42.     protected $locale;
  43.     /**
  44.      * @var string
  45.      *
  46.      * @Column(type="string", length=32)
  47.      */
  48.     #[Column(typeTypes::STRINGlength32)]
  49.     protected $property;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @Column(type="text", nullable=true)
  54.      */
  55.     #[Column(typeTypes::TEXTnullabletrue)]
  56.     protected $value;
  57.     /**
  58.      * Get id
  59.      *
  60.      * @return int $id
  61.      */
  62.     public function getId()
  63.     {
  64.         return $this->id;
  65.     }
  66. }