src/Entity/Blog/ArticleTranslation.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);    
  3. namespace App\Entity\Blog;
  4. use App\Repository\Blog\ArticleRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  7. use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
  8. #[ORM\Entity(repositoryClassArticleRepository::class)]
  9. class ArticleTranslation implements TranslationInterface
  10. {
  11.     use TranslationTrait;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[ORM\Column(length255)]
  17.     private ?string $titre null;
  18.     #[ORM\Column(type'text'nullabletrue)]
  19.     private ?string $contenu null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getTitre(): ?string
  25.     {
  26.         return $this->titre;
  27.     }
  28.     public function setTitre(string $titre): self
  29.     {
  30.         $this->titre $titre;
  31.         return $this;
  32.     }
  33.     public function getContenu(): ?string
  34.     {
  35.         return $this->contenu;
  36.     }
  37.     public function setContenu(?string $contenu): static
  38.     {
  39.         $this->contenu $contenu;
  40.         return $this;
  41.     }
  42. }