function __construct(Page $page) { $this->page = $page; $this->tree = new PageTreeProvider($this->page->GetSite()); $areaList = new AreaListProvider($page->GetLayout()); $this->areas = $areaList->ToArray(); $this->child = $this->tree->FirstChildOf($this->page); }
function __construct(Page $page, Page $selected = null, $disabled = false) { $this->page = $page; $this->selected = $selected; $this->checked = $this->page->Equals($selected); $this->tree = new PageTreeProvider($this->page->GetSite()); $this->child = $this->tree->FirstChildOf($this->page); $this->disabled = $disabled; }
/** * Adds a page and all of its children * @param Page $page The current page */ private function AddPageBranch(Page $page) { $this->AddPage($page); $child = $this->pageTree->FirstChildOf($page); while ($child) { $this->AddPageBranch($child); $child = $this->pageTree->NextOf($child); } }