src/Contao/View/Contao2BackendView/ViewHelpers.php
public static function redirectHome(EnvironmentInterface $environment)
    {
        $input = $environment->getInputProvider();

        if ($input->hasParameter('table') && ($hasParentId = $input->hasParameter('pid'))) {
            if ($hasParentId) {
                $event = new RedirectEvent(
                    \sprintf(
                        'contao?do=%s&table=%s&pid=%s',
                        $input->getParameter('do'),
                        $input->getParameter('table'),
                        $input->getParameter('pid')
                    )
                );
            } else {
                $event = new RedirectEvent(
                    \sprintf(
                        'contao?do=%s&table=%s',
                        $input->getParameter('do'),
                        $input->getParameter('table')
                    )
                );
            }
        } else {
            $event = new RedirectEvent(
                \sprintf(
                    'contao?do=%s',
                    $input->getParameter('do')
                )
            );
        }

        $environment->getEventDispatcher()->dispatch(ContaoEvents::CONTROLLER_REDIRECT, $event);
    }
public static function redirectHome(EnvironmentInterface $environment)
    {
        $input = $environment->getInputProvider();

        if ($input->hasParameter('table') && ($hasParentId = $input->hasParameter('pid'))) {
            if ($hasParentId) {
                $event = new RedirectEvent(
                    \sprintf(
                        'contao?do=%s&table=%s&pid=%s',
                        $input->getParameter('do'),
                        $input->getParameter('table'),
                        $input->getParameter('pid')
                    )
                );
            } else {
                $event = new RedirectEvent(
                    \sprintf(
                        'contao?do=%s&table=%s',
                        $input->getParameter('do'),
                        $input->getParameter('table')
                    )
                );
            }
        } else {
            $event = new RedirectEvent(
                \sprintf(
                    'contao?do=%s',
                    $input->getParameter('do')
                )
            );
        }

        $environment->getEventDispatcher()->dispatch(ContaoEvents::CONTROLLER_REDIRECT, $event);
    }
public static function redirectHome ( EnvironmentInterface $ environment ) { $ input = $ environment -> getInputProvider ( ) ; if ( $ input -> hasParameter ( 'table' ) && ( $ hasParentId = $ input -> hasParameter ( 'pid' ) ) ) { if ( $ hasParentId ) { $ event = new RedirectEvent ( \ sprintf ( 'contao?do=%s&table=%s&pid=%s' , $ input -> getParameter ( 'do' ) , $ input -> getParameter ( 'table' ) , $ input -> getParameter ( 'pid' ) ) ) ; } else { $ event = new RedirectEvent ( \ sprintf ( 'contao?do=%s&table=%s' , $ input -> getParameter ( 'do' ) , $ input -> getParameter ( 'table' ) ) ) ; } } else { $ event = new RedirectEvent ( \ sprintf ( 'contao?do=%s' , $ input -> getParameter ( 'do' ) ) ) ; } $ environment -> getEventDispatcher ( ) -> dispatch ( ContaoEvents :: CONTROLLER_REDIRECT , $ event ) ; }
Redirects to the real back end module.

@param EnvironmentInterface $environment The environment.

@return void
Redirects to the real back end module .