vendor/gedmo/doctrine-extensions/src/Translatable/Entity/MappedSuperclass/AbstractPersonalTranslation.php line 21

  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\Translatable\Entity\MappedSuperclass;
  9. use Doctrine\DBAL\Types\Types;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation
  13.  *
  14.  * @ORM\MappedSuperclass
  15.  */
  16. #[ORM\MappedSuperclass]
  17. abstract class AbstractPersonalTranslation
  18. {
  19.     /**
  20.      * @var int|null
  21.      *
  22.      * @ORM\Column(type="integer")
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="IDENTITY")
  25.      */
  26.     #[ORM\Column(typeTypes::INTEGER)]
  27.     #[ORM\Id]
  28.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  29.     protected $id;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(type="string", length=8)
  34.      */
  35.     #[ORM\Column(typeTypes::STRINGlength8)]
  36.     protected $locale;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(type="string", length=32)
  41.      */
  42.     #[ORM\Column(typeTypes::STRINGlength32)]
  43.     protected $field;
  44.     /**
  45.      * Related entity with ManyToOne relation
  46.      * must be mapped by user
  47.      *
  48.      * @var object
  49.      */
  50.     protected $object;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(type="text", nullable=true)
  55.      */
  56.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  57.     protected $content;
  58.     /**
  59.      * Get id
  60.      *
  61.      * @return int|null $id
  62.      */
  63.     public function getId()
  64.     {
  65.         return $this->id;
  66.     }
  67.     /**
  68.      * Set locale
  69.      *
  70.      * @param string $locale
  71.      *
  72.      * @return static
  73.      */
  74.     public function setLocale($locale)
  75.     {
  76.         $this->locale $locale;
  77.         return $this;
  78.     }
  79.     /**
  80.      * Get locale
  81.      *
  82.      * @return string
  83.      */
  84.     public function getLocale()
  85.     {
  86.         return $this->locale;
  87.     }
  88.     /**
  89.      * Set field
  90.      *
  91.      * @param string $field
  92.      *
  93.      * @return static
  94.      */
  95.     public function setField($field)
  96.     {
  97.         $this->field $field;
  98.         return $this;
  99.     }
  100.     /**
  101.      * Get field
  102.      *
  103.      * @return string $field
  104.      */
  105.     public function getField()
  106.     {
  107.         return $this->field;
  108.     }
  109.     /**
  110.      * Set object related
  111.      *
  112.      * @param object $object
  113.      *
  114.      * @return static
  115.      */
  116.     public function setObject($object)
  117.     {
  118.         $this->object $object;
  119.         return $this;
  120.     }
  121.     /**
  122.      * Get related object
  123.      *
  124.      * @return object
  125.      */
  126.     public function getObject()
  127.     {
  128.         return $this->object;
  129.     }
  130.     /**
  131.      * Set content
  132.      *
  133.      * @param string $content
  134.      *
  135.      * @return static
  136.      */
  137.     public function setContent($content)
  138.     {
  139.         $this->content $content;
  140.         return $this;
  141.     }
  142.     /**
  143.      * Get content
  144.      *
  145.      * @return string
  146.      */
  147.     public function getContent()
  148.     {
  149.         return $this->content;
  150.     }
  151. }