Example #1
0
 public function getPassThruActionAndParameters($method, $parameters = array())
 {
     $return = parent::getPassThruActionAndParameters($method, $parameters);
     $parameters = $return[1];
     // pop the last element off the array and get it
     $bID = array_pop($parameters);
     if ($bID == $this->bID) {
         // this is the proxy block. So we pop off the block ID and replace it with the original ID
         $parameters[] = $this->bOriginalID;
         $return[1] = $parameters;
     }
     return $return;
 }
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;
 }