src/Yggdrasil/Core/Controller/AbstractController.php
protected function redirectToAction(string $alias = null, array $params = []): RedirectResponse
    {
        if (empty($alias)) {
            $routerConfig = $this->getRouter()->getConfiguration();
            $alias = "{$routerConfig->getDefaultController()}:{$routerConfig->getDefaultAction()}";
        }

        $query = $this->getRouter()->getQuery($alias, $params);
        $headers = $this->getResponse()->headers->all();

        return new RedirectResponse($query, Response::HTTP_FOUND, $headers);
    }
protected function redirectToAction(string $alias = null, array $params = []): RedirectResponse
    {
        if (empty($alias)) {
            $routerConfig = $this->getRouter()->getConfiguration();
            $alias = "{$routerConfig->getDefaultController()}:{$routerConfig->getDefaultAction()}";
        }

        $query = $this->getRouter()->getQuery($alias, $params);
        $headers = $this->getResponse()->headers->all();

        return new RedirectResponse($query, Response::HTTP_FOUND, $headers);
    }
protected function redirectToAction ( string $ alias = null , array $ params = [ ] ) : RedirectResponse { if ( empty ( $ alias ) ) { $ routerConfig = $ this -> getRouter ( ) -> getConfiguration ( ) ; $ alias = "{$routerConfig->getDefaultController()}:{$routerConfig->getDefaultAction()}" ; } $ query = $ this -> getRouter ( ) -> getQuery ( $ alias , $ params ) ; $ headers = $ this -> getResponse ( ) -> headers -> all ( ) ; return new RedirectResponse ( $ query , Response :: HTTP_FOUND , $ headers ) ; }
Redirects to given action

@param string? $alias  Alias of action like Controller:action, if left empty default action will be chosen
@param array   $params Parameters supposed to be passed to the action
@return RedirectResponse
Redirects to given action