src/Entity/DiseaseTranslation.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Translation\AutoTranslationTrait;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
  6. #[ORM\Entity]
  7. class DiseaseTranslation implements TranslationInterface
  8. {
  9.     use AutoTranslationTrait;
  10.     #[ORM\Id]
  11.     #[ORM\Column(type'integer')]
  12.     #[ORM\GeneratedValue(strategy'AUTO')]
  13.     private $id;
  14.     #[ORM\Column(type'string'nullabletrue)]
  15.     private ?string $name null;
  16.     #[ORM\Column(type'json'nullabletrue)]
  17.     private ?array $contentBlocks null;
  18.     public function getId(): ?int
  19.     {
  20.         return $this->id;
  21.     }
  22.     public function getName(): ?string
  23.     {
  24.         return $this->name;
  25.     }
  26.     public function setName(string $name): DiseaseTranslation
  27.     {
  28.         $this->name $name;
  29.         return $this;
  30.     }
  31.     public function getContentBlocks(): ?array
  32.     {
  33.         return $this->contentBlocks;
  34.     }
  35.     public function setContentBlocks(array $contentBlocks): DiseaseTranslation
  36.     {
  37.         $this->contentBlocks $contentBlocks;
  38.         return $this;
  39.     }
  40. }