示例#1
0
 /**
  * @param PageInterface $page
  * @return void
  */
 public function visitPage(PageInterface $page)
 {
     $this->visitChild($page->getWritableBearer());
 }
示例#2
0
 /**
  * Render $page into html.
  *
  * This method is generally called via double-dispatch, as provided by Visitor\VisitableTrait.
  *
  * @param PageInterface $page
  * @return string
  */
 public function visitPage(PageInterface $page)
 {
     $template = 'page/' . $page->getType() . '.twig';
     return $this->loadTemplate($template)->render(["id" => $page->getId(), "classes" => $page->getClasses(), "data" => $page->getData(), "title" => $page->getTitle(), "baseHref" => $page->getBaseHref(), "writables" => $page->getWritables(), "projectCSS" => Settings::getInstance()->getProjectCSS(), "projectJS" => Settings::getInstance()->getProjectJS()]);
 }