public function __construct(PageInterface $page, $display = true) { $this->children = $page->getChildren(); $this->length = count($this->children); $this->display = $display; $this->rewind(); }