src/Entity/UserTranslation.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\UserTranslationRepository;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Locastic\ApiPlatformTranslationBundle\Model\AbstractTranslation;
  8. use Locastic\ApiPlatformTranslationBundle\Model\TranslatableInterface;
  9. /**
  10.  * @ORM\Entity(repositoryClass=UserTranslationRepository::class)
  11.  */
  12. class UserTranslation extends AbstractTranslation
  13. {
  14.     /**
  15.      * @ORM\ManyToOne(targetEntity="User", inversedBy="translations")
  16.      * @ORM\JoinColumn(onDelete="CASCADE")
  17.      * @Groups({"User:Write", "User:Change-Profile", "UserTranslationGroup"})
  18.      */
  19.     protected $translatable null;
  20.     /**
  21.      * @ORM\Column(type="string", length=16)
  22.      * @Groups({"User:Write", "User:Change-Profile", "UserTranslationGroup"})
  23.      * 
  24.      * @Assert\NotBlank(message="validation.userTranslation:locale.notBlank")
  25.      */
  26.     protected $locale null;
  27.     /**
  28.      * @ORM\Id
  29.      * @ORM\GeneratedValue
  30.      * @ORM\Column(type="integer")
  31.      */
  32.     private $id;
  33.     /**
  34.      * @ORM\Column(type="text", nullable=true)
  35.      * @Groups({"User:Write", "User:Get-Item", "User:Change-Profile", "UserTranslationGroup"})
  36.      */
  37.     private $biography;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getBiography(): ?string
  43.     {
  44.         return $this->biography;
  45.     }
  46.     public function setBiography(?string $biography): self
  47.     {
  48.         $this->biography $biography;
  49.         return $this;
  50.     }
  51. }