protected function renderBlock($block, Controller $controllerInstance) { $controllerInstance->setBlockName($block['container']); $block['response'] = $controllerInstance->getBlockResponse($block); if (!$block['response']) { $blockOutput = ''; $this->getRenderer()->appendValue($block['container'], $blockOutput); return $blockOutput; } if (!$block['response'] instanceof BlockResponse) { throw new ApplicationException("Unknown response flom a block"); } $this->postProcessResponse($block['response'], $controllerInstance); //$blockOutput = $this->getRenderer()->process($block['response'], $block['view']); // dynamically loaded blocks if (substr($block['view'], 0, 2) == './') { // trim .tpl $block['view'] = substr($block['view'], 0, -4); $block['view'] = $this->getView($block['call'][0]->getControllerName(), $block['view']); } $blockOutput = $this->getRenderer()->process($block['response'], $block['view']); $this->getRenderer()->appendValue($block['container'], $blockOutput); return $blockOutput; }