Ojs\SiteBundle\Controller\RedirectController::redirectAction PHP Method

redirectAction() public method

redirect/{type}/id will redirect to related page after checking user login status
public redirectAction ( string $type, string | integer $id ) : RedirectResponse
$type string
$id string | integer
return Symfony\Component\HttpFoundation\RedirectResponse
    public function redirectAction($type, $id)
    {
        $doctrine = $this->getDoctrine();
        switch ($type) {
            case 'article':
                return $this->redirectArticle($doctrine, $id);
            case 'journal':
                return $this->redirectJournal($doctrine, $id);
            default:
                throw $this->createNotFoundException();
        }
    }