Beispiel #1
0
 public function redirect()
 {
     $id = $this->request->get('id');
     $params = array();
     if ($this->isAjax()) {
         $params['query'] = array('ajax' => 1);
     }
     $params['query'] = array('return' => $_SERVER['REQUEST_URI']);
     switch ($id) {
         case 401:
             return new ActionRedirectResponse('user', 'login', $params);
         default:
             $response = new ActionResponse('id', $id);
             $response->setStatusCode($this->request->get('id'));
             return $response;
     }
 }