private function renderPage(PageInterface $page, Request $request)
 {
     $work = $page->work($this->container, $request);
     $page->setContainer($this->container);
     $work['_page'] = $page;
     return $this->render($page->getDefaultView(), $work);
 }
 /**
  * @param PageInterface $page
  * @param $name
  * @return AbstractPartial[]
  */
 public function collectPartials(PageInterface $page, $name)
 {
     $filtered = $page->getPartials()->filter(function ($entry) use($name) {
         return $entry->getRegion() === $name;
     });
     return $filtered;
 }