*/ #[ORM\ManyToMany(targetEntity: NewsCategory::class)] private Collection $newsCategories; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?Seo $seo = null; public function __construct() { $this->newsCategories = new ArrayCollection(); } public function getId(): ?Uuid { return $this->id; } public function getCode(): ?string { return $this->code; } public function setCode(string $code): static { $this->code = $code; return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(bool $active): static { $this->active = $active; return $this; } public function getCreateAt(): ?\DateTimeInterface { return $this->createAt; } public function setCreateAt(\DateTimeInterface $createAt): static { $this->createAt = $createAt; return $this; } public function getUpdateAt(): ?\DateTimeInterface { return $this->updateAt; } public function setUpdateAt(\DateTimeInterface $updateAt): static { $this->updateAt = $updateAt; return $this; } public function getSort(): ?int { return $this->sort; } public function setSort(int $sort): static { $this->sort = $sort; return $this; } public function getPreviewImage(): ?string { return $this->previewImage; } public function setPreviewImage(string $previewImage): static { $this->previewImage = $previewImage; return $this; } public function getDetailImage(): ?string { return $this->detailImage; } public function setDetailImage(string $detailImage): static { $this->detailImage = $detailImage; return $this; } public function getPreviewText(): ?string { return $this->previewText; } public function setPreviewText(string $previewText): static { $this->previewText = $previewText; return $this; } public function getDetailText(): ?string { return $this->detailText; } public function setDetailText(string $detailText): static { $this->detailText = $detailText; return $this; } public function getType(): ?NewsType { return $this->type; } public function setType(?NewsType $type): static { $this->type = $type; return $this; } public function isMainPageRender(): ?bool { return $this->mainPageRender; } public function setMainPageRender(bool $mainPageRender): static { $this->mainPageRender = $mainPageRender; return $this; } /** * @return Collection */ public function getNewsCategories(): Collection { return $this->newsCategories; } public function addNewsCategory(NewsCategory $newsCategory): static { if (!$this->newsCategories->contains($newsCategory)) { $this->newsCategories->add($newsCategory); } return $this; } public function removeNewsCategory(NewsCategory $newsCategory): static { $this->newsCategories->removeElement($newsCategory); return $this; } public function getSeo(): ?Seo { return $this->seo; } public function setSeo(?Seo $seo): static { $this->seo = $seo; return $this; } }