src/Contao/View/Contao2BackendView/EventListener/BackButtonListener.php
private function getReferrerUrl(EnvironmentInterface $environment)
    {
        $parent = $environment->getParentDataDefinition();
        $event  = new GetReferrerEvent(
            true,
            (null !== $parent)
                ? $parent->getName()
                : $environment->getDataDefinition()->getName()
        );

        $environment->getEventDispatcher()->dispatch(ContaoEvents::SYSTEM_GET_REFERRER, $event);

        return $event->getReferrerUrl();
    }
private function getReferrerUrl(EnvironmentInterface $environment)
    {
        $parent = $environment->getParentDataDefinition();
        $event  = new GetReferrerEvent(
            true,
            (null !== $parent)
                ? $parent->getName()
                : $environment->getDataDefinition()->getName()
        );

        $environment->getEventDispatcher()->dispatch(ContaoEvents::SYSTEM_GET_REFERRER, $event);

        return $event->getReferrerUrl();
    }
private function getReferrerUrl ( EnvironmentInterface $ environment ) { $ parent = $ environment -> getParentDataDefinition ( ) ; $ event = new GetReferrerEvent ( true , ( null !== $ parent ) ? $ parent -> getName ( ) : $ environment -> getDataDefinition ( ) -> getName ( ) ) ; $ environment -> getEventDispatcher ( ) -> dispatch ( ContaoEvents :: SYSTEM_GET_REFERRER , $ event ) ; return $ event -> getReferrerUrl ( ) ; }
Determine the correct referrer URL.

@param EnvironmentInterface $environment The environment.

@return mixed
Determine the correct referrer URL .