*/ #[ORM\OneToMany(targetEntity: NewsComments::class, mappedBy: 'news_id')] private Collection $news_comments_id; public function __construct() { $this->news_comments_id = new ArrayCollection(); } public function getId(): ?int { 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(): ?\DateTimeImmutable { return $this->create_at; } public function setCreateAt(\DateTimeImmutable $create_at): static { $this->create_at = $create_at; return $this; } public function getUpdateAt(): ?\DateTimeInterface { return $this->update_at; } public function setUpdateAt(\DateTimeInterface $update_at): static { $this->update_at = $update_at; 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->preview_image; } public function setPreviewImage(?string $preview_image): static { $this->preview_image = $preview_image; return $this; } public function getDetailImage(): ?string { return $this->detail_image; } public function setDetailImage(?string $detail_image): static { $this->detail_image = $detail_image; return $this; } public function getPreviewText(): ?string { return $this->preview_text; } public function setPreviewText(?string $preview_text): static { $this->preview_text = $preview_text; return $this; } public function getDetailTest(): ?string { return $this->detail_test; } public function setDetailTest(?string $detail_test): static { $this->detail_test = $detail_test; return $this; } public function getTypeId(): ?NewsType { return $this->type_id; } public function setTypeId(?NewsType $type_id): static { $this->type_id = $type_id; return $this; } public function isMainPageRender(): ?bool { return $this->main_page_render; } public function setMainPageRender(bool $main_page_render): static { $this->main_page_render = $main_page_render; return $this; } /** * @return Collection */ public function getNewsCommentsId(): Collection { return $this->news_comments_id; } public function addNewsCommentsId(NewsComments $newsCommentsId): static { if (!$this->news_comments_id->contains($newsCommentsId)) { $this->news_comments_id->add($newsCommentsId); $newsCommentsId->setNewsId($this); } return $this; } public function removeNewsCommentsId(NewsComments $newsCommentsId): static { if ($this->news_comments_id->removeElement($newsCommentsId)) { // set the owning side to null (unless already changed) if ($newsCommentsId->getNewsId() === $this) { $newsCommentsId->setNewsId(null); } } return $this; } }