Routing/UrlPatcher.php
public function overrideRouteTokens($name, &$tokens) {
        $menu = $this->repository->findByViewRoute($name);
        if (isset($menu)) {
            # search the key for the first token with using 'text' as type
            $key = array_search('text', array_column($tokens, 0));
            # replace thwe path with the path from the menu, don't forget the beginning /
            array_splice($tokens[$key], -1, 1, '/'.$menu->getPath());
            return true;
        }
        return null;
    }
public function overrideRouteTokens($name, &$tokens) {
        $menu = $this->repository->findByViewRoute($name);
        if (isset($menu)) {
            # search the key for the first token with using 'text' as type
            $key = array_search('text', array_column($tokens, 0));
            # replace thwe path with the path from the menu, don't forget the beginning /
            array_splice($tokens[$key], -1, 1, '/'.$menu->getPath());
            return true;
        }
        return null;
    }
public function overrideRouteTokens ( $ name , & $ tokens ) { $ menu = $ this -> repository -> findByViewRoute ( $ name ) ; if ( isset ( $ menu ) ) { # search the key for the first token with using 'text' as type $ key = array_search ( 'text' , array_column ( $ tokens , 0 ) ) ; # replace thwe path with the path from the menu, don't forget the beginning / array_splice ( $ tokens [ $ key ] , - 1 , 1 , '/' . $ menu -> getPath ( ) ) ; return true ; } return null ; }
does overwrite the route tokens
does return true on success, or false if wrong route.

@author  Hans Mackowiak <hmackowiak@xtain.net>
@param string $name
@param array $tokens
@return null|string
does overwrite the route tokens does return true on success or false if wrong route .