Beispiel #1
0
 /**
  * Uses the cmdRedirect class property and redirects to it. If nothing is set we try to go back to the referrer,
  * but this default behaviour is error prone, as that value it set by the browser and can not be trusted. Should
  * be changed in future versions.
  *
  * @api
  *
  * @throws exception\ControllerException
  *
  * @param string $route
  * @param array $arguments (optional)
  */
 protected final function redirect($route, array $arguments = [])
 {
     if (empty($route)) {
         throw new exception\ControllerException(_s('Attempt to redirect to a unknown url'));
     }
     // close transaction, if present
     if ($this->atomic) {
         DBConnection::getInstance()->commit();
     }
     Router::redirect($route, $arguments);
 }