public function __construct(PageInterface $page, $display = true) { $this->children = $page->getChildren(); $this->length = count($this->children); $this->display = $display; $this->rewind(); }
/** * Add children. * * @param PageInterface $children * * @return Page */ public function addChildren(PageInterface $children) { $children->setParent($this); $this->children[] = $children; return $this; }
protected function createRoute(PageInterface $page) { $defaults = ['_controller' => 'symedit.controller.page:showAction', '_page' => $page]; // Merge in other defaults for non-page controllers if (!$page->getPageController()) { $defaults = array_merge($defaults, ['_sylius' => ['cache' => ['last_modified' => 'resource.updatedAt', 'public' => true]]]); } return new Route($page->getPath(), $defaults); }