src/Entity/LangueTranslation.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\LangueTranslationRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassLangueTranslationRepository::class)]
  8. #[ApiResource(
  9.     normalizationContext: ['groups' => ['profile']],
  10.     denormalizationContext: ['groups' => ['profile']],
  11.     
  12.     )]
  13. class LangueTranslation
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     private ?int $id null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     #[Groups("profile")]
  21.     private ?string $content null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     #[Groups("profile")]
  24.     private ?string $locale null;
  25.     #[ORM\ManyToOne(inversedBy'translations')]
  26.     private ?Langue $langue null;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getContent(): ?string
  32.     {
  33.         return $this->content;
  34.     }
  35.     public function setContent(?string $content): self
  36.     {
  37.         $this->content $content;
  38.         return $this;
  39.     }
  40.     public function getLocale(): ?string
  41.     {
  42.         return $this->locale;
  43.     }
  44.     public function setLocale(?string $locale): self
  45.     {
  46.         $this->locale $locale;
  47.         return $this;
  48.     }
  49.     public function getLangue(): ?Langue
  50.     {
  51.         return $this->langue;
  52.     }
  53.     public function setLangue(?Langue $langue): self
  54.     {
  55.         $this->langue $langue;
  56.         return $this;
  57.     }
  58. }