public function resolveRoute($route)
    {
        $routeParts = explode('/', $route);
        foreach ($routeParts as $k => $v) {
            if (($k == 0 && $v == $this->id) || (empty($v))) {
                unset($routeParts[$k]);
            }
        }
        if (count($routeParts) == 0) {
            return $this->defaultRoute;
        }

        return implode('/', $routeParts);
    }
public function resolveRoute($route)
    {
        $routeParts = explode('/', $route);
        foreach ($routeParts as $k => $v) {
            if (($k == 0 && $v == $this->id) || (empty($v))) {
                unset($routeParts[$k]);
            }
        }
        if (count($routeParts) == 0) {
            return $this->defaultRoute;
        }

        return implode('/', $routeParts);
    }
public function resolveRoute ( $ route ) { $ routeParts = explode ( '/' , $ route ) ; foreach ( $ routeParts as $ k => $ v ) { if ( ( $ k == 0 && $ v == $ this -> id ) || ( empty ( $ v ) ) ) { unset ( $ routeParts [ $ k ] ) ; } } if ( count ( $ routeParts ) == 0 ) { return $ this -> defaultRoute ; } return implode ( '/' , $ routeParts ) ; }
Extract the current module from the route and return the new resolved route.

@param string $route Route to resolve, e.g. `admin/default/index`
@return string The resolved route without the module id `default/index` when input was `admin/default/index`
and the current module id is `admin`.
Extract the current module from the route and return the new resolved route .