Example #1
0
 protected function deliverResponse(BlockController $controller, $action)
 {
     list($method, $parameters) = $controller->getPassThruActionAndParameters(array($action));
     if ($controller->isValidControllerTask($method, $parameters)) {
         $controller->on_start();
         $response = $controller->runAction($method, $parameters);
         if ($response instanceof \Symfony\Component\HttpFoundation\Response) {
             return $response;
         } else {
             $r = new Response($response);
             return $r;
         }
     }
     $response = new Response(t('Access Denied'));
     return $response;
 }
Example #2
0
 public function on_start()
 {
     parent::on_start();
     $this->app = Facade::getFacadeApplication();
     $this->entityManager = $this->app->make('database/orm')->entityManager();
 }