Contao\CoreBundle\Framework\ContaoFramework::getRoute PHP Method

getRoute() private method

Returns the route.
private getRoute ( ) : string | null
return string | null
    private function getRoute()
    {
        if (null === $this->request) {
            return null;
        }
        $attributes = $this->request->attributes;
        try {
            $route = $this->router->generate($attributes->get('_route'), $attributes->get('_route_params'));
        } catch (\InvalidArgumentException $e) {
            return null;
        }
        return substr($route, strlen($this->request->getBasePath()) + 1);
    }