/** * Render the layout * @param array $blocks * @return string */ function render($blocks = array()) { if ($this->is_admin_page) { $this->view->jQuery()->enable()->uiEnable(); } $all_regions = $this->getAllRegions(); foreach ($all_regions as $region) { $regions[$region['name']] = $this->renderRegion($region, @$blocks[$region['name']]); } $this->view->assign('regions', $regions); $this->view->assign('layout', $this); return $this->view->render($this->template); }