Example #1
0
 public function block($controllerName, $action, array $arguments = null)
 {
     try {
         $blockControllerClassName = Controller::getControllerClassName($controllerName);
         $blockController = new $blockControllerClassName($this->helperInjector->getInjector());
         $blockController->initBlock($action, (array) $arguments);
         $this->render($blockController->getView(), $blockController->getData());
     } catch (\Exception $e) {
         $exceptionView = \Sea\DIR . 'app/views/exceptions/block.html.php';
         if (is_file($exceptionView)) {
             require $exceptionView;
         } else {
             throw $e;
         }
     }
 }