/** * Controller methods that will result in HTML ouput will benefit from preparing the * involed objects by calling this method. * Once ready to return the response, the complementary $this->withBody() should be called to * obtain a response object having a properly constructed HTML page. * */ public function preparePage() { $this->template = $this->getService('template'); $this->importCommonViews(); $locale = $this->getService('settings')->get('locale'); $menu = $this->getService('menu'); $breadCrumbs = new \A3gZ\Menu\BreadCrumbs($menu); $this->template->setData(['menu' => $menu, 'breadCrumbs' => $breadCrumbs, 'locale' => $locale]); }