Example #1
0
 public function isValidControllerTask($method, $parameters = array())
 {
     $controller = $this->getController();
     if ($controller) {
         if (method_exists($controller, $method)) {
             return true;
         }
         return parent::isValidControllerTask($method, $parameters);
     }
 }
Example #2
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 #3
0
 public function isValidControllerTask($method, $parameters = array())
 {
     if (!$this->enableExternalFiltering) {
         return false;
     }
     return parent::isValidControllerTask($method, $parameters);
 }