src/Entity/SpecialTitleTranslation.php line 14

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