public function __construct($page, $lang, $mime = 'text/html') { parent::__construct($page, $lang, $mime); array_pop($page); $this->parent = array_pop($page); $this->pageUrl = \Services\PageTree::instance($lang)->getUrl($this->parent['id']); $this->number = -1; foreach ($this->parent['children'] as $index => $child) { if ($child['id'] == $this->page['id']) { $this->number = $index; } } }
public function __construct($page, $lang, $mime = 'text/html') { parent::__construct($page, $lang, $mime); array_pop($page); $this->parent = array_pop($page); }