name_page = $name; $this->end_of_path = $eop; $this->reachable = $reachable; $this->in_menu = $in_menu; $this->parent = $parent; $this->children = new ArrayCollection(); } // getters /*public function getId(): int { return $this->id_page; }*/ public function getPageName(): string { return $this->name_page; } public function getPagePath(): string { return $this->page_path; } public function getEndOfPath(): string { return $this->end_of_path; } public function getInMenu(): bool { return $this->in_menu; } public function getParent(): ?Page { return $this->parent; } public function getChildren(): Collection { return $this->children; } public function fillChildrenPagePath(string $parent_path = ''): void { $this->page_path = $parent_path != '' ? $parent_path . '/' . $this->end_of_path : $this->end_of_path; foreach($this->getChildren() as $page){ $page->fillChildrenPagePath($this->page_path); } } public function addChild(self $child): void { $this->children[] = $child; } }