/** * Helper method that creates an action method result encapsulating redirection * * @param string $routeName name of the route to use when building an address. * Route must be presented in IRouteTable * @param array $parameters parameters to pass to Route for building an address * * @return RedirectToRouteResult */ protected function redirect($routeName, array $parameters = array()) { $url = $this->trace->getWebContext()->getRequest()->getHttpUrl()->spawnBase(); $this->trace->getRouteTable()->getRoute($routeName)->compose($url, $parameters); return new RedirectResult($url); }
/** * Sets the trace used to invoke the MVC stack * * @param Trace $trace * * @return UIViewPresentation */ function setTrace(Trace $trace) { $this->trace = $trace; if (!$this->routeTable) { $this->routeTable = $trace->getRouteTable(); } return $this; }