src/Entity/PageTranslation.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PageTranslationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  6. use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
  7. #[ORM\Entity(repositoryClassPageTranslationRepository::class)]
  8. class PageTranslation implements TranslationInterface
  9. {
  10.     use TranslationTrait;
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $name;
  17.     #[ORM\Column(type'text'length16777215nullabletrue)]
  18.     private $content;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getName(): ?string
  24.     {
  25.         return $this->name;
  26.     }
  27.     public function setName(string $name): self
  28.     {
  29.         $this->name $name;
  30.         return $this;
  31.     }
  32.     public function getContent(): ?string
  33.     {
  34.         return $this->content;
  35.     }
  36.     public function setContent(string $content): self
  37.     {
  38.         $this->content $content;
  39.         return $this;
  40.     }
  41.     public function __toString()
  42.     {
  43.         return $this->getName();
  44.     }
  45. }