<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use App\Repository\BlockRepository;use Gedmo\Translatable\Translatable;use Doctrine\ORM\Mapping\UniqueConstraint;use App\Entity\Translation\PageTranslation;use App\Entity\Translation\BlockTranslation;use Gedmo\Mapping\Annotation\TranslationEntity;use Doctrine\Common\Collections\ArrayCollection;use Gedmo\Mapping\Annotation\Locale as GedmoLocale;use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;#[ORM\Entity(repositoryClass: BlockRepository::class)]#[UniqueConstraint(name: "intname", columns: ["intname"])]#[TranslationEntity(class: BlockTranslation::class)]class Block implements EntityInterface{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $intname; #[ORM\Column(type: 'string', length: 255)] private $name = ''; #[GedmoTranslatable] #[ORM\Column(type: 'text')] private $value = ''; #[GedmoLocale] private $locale; #[ORM\OneToMany(targetEntity: BlockTranslation::class, mappedBy: 'object', cascade: ['persist', 'remove'])] private $translations; public function __construct() { $this->translations = new ArrayCollection(); } public function setLocale($locale) { $this->locale = $locale; } public function getTranslations() { return $this->translations; } public function addTranslation(BlockTranslation $t) { if (!$this->translations->contains($t)) { $this->translations[] = $t; $t->setObject($this); } } public function getId(): ?int { return $this->id; } public function getIntname(): ?string { return $this->intname; } public function setIntname(string $intname): self { $this->intname = $intname; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getValue(): ?string { return $this->value; } public function setValue(string $value): self { $this->value = $value; return $this; }}