public function hasContent(){ return ($this->_content instanceof Block); } public function getContent(){ if($this->_content instanceof Block) return $this->_content; throw new \Exception('Cannot render theme, not yet configured'); } public function getControlMenu(){ $menu = new Menu(); $menu->insert(sprintf('<a href="%s">%s</a>', app()->getUrl(), t('Home')), 100); if($this->request->user->can('editOptsBasic')) $menu->insert(sprintf('<a href="%s">%s</a>', app()->getUrl('control'), t('Under the Hood')), 80);
} $templates[] = 'block.container'; $this->render($templates, compact('block', 'asModel')); $this->log->info('Rendered zone <%s>', $block->tag); } public function renderBlocks($asModel = false){ $this->renderBlock($this->getContent(), $asModel); } /** * Renders a template file * * @access public
* @Link: http://locations.org * @Last Modified by: hello@digitalnature.eu * @Last Modified time: 2016-10-17 11:41:54 */ ?> <?php $theme->render('document.head'); ?> <?php $theme->renderBlocks(); ?> <?php $theme->render('document.end'); ?>