private function getPrevNext(HasNodeInterface $page, $loop) { $class = ClassLookup::getClass($page); $id = $page->getId(); if (false === isset($this->nav[$class][$id])) { $parent = $this->contentCategory->getParentCategory($page, true); $siblings = $this->siteTree->getChildren($parent, ['refName' => $class, 'depth' => 1]) ?: new UnknownNodeBranch(); $this->nav[$class][$id] = $this->calculatePrevNext($siblings, $page, $loop); } return array_values($this->nav[$class][$id]); }
public function getParentCategory(HasNodeInterface $page, $includeHidden = false) { return $this->categoryService->getParentCategory($page, $includeHidden); }