public function mapRoute2Toc($route, $toc)
    {
        if (key_exists($route, $toc)) {
            return $route;
        } elseif (key_exists($route . "/index", $toc)) {
            return $route . "/index";
        }

        throw new \Anax\Exception\NotFoundException(t('The page does not exists.'));
    }
public function mapRoute2Toc($route, $toc)
    {
        if (key_exists($route, $toc)) {
            return $route;
        } elseif (key_exists($route . "/index", $toc)) {
            return $route . "/index";
        }

        throw new \Anax\Exception\NotFoundException(t('The page does not exists.'));
    }
public function mapRoute2Toc ( $ route , $ toc ) { if ( key_exists ( $ route , $ toc ) ) { return $ route ; } elseif ( key_exists ( $ route . "/index" , $ toc ) ) { return $ route . "/index" ; } throw new \ Anax \ Exception \ NotFoundException ( t ( 'The page does not exists.' ) ) ; }
Map the route to the correct entry in the toc.

@param string $route current route used to access page.
@param array  $toc   the toc as array.

@return string as the title for the content.
Map the route to the correct entry in the toc .