protected function normalizeRoutePath($routePath)
    {
        $routePath = Reaction::$app->getAlias((string) $routePath);
        if (strncmp($routePath, '/', 1) === 0) {
            // absolute route
            return $routePath;
        }

        $route = $this->app->getRoute();

        // relative route
        if ($route === null || $route->controller === null) {
            throw new InvalidArgumentException("Unable to resolve the relative route: $routePath. No active controller is available.");
        }

        return $routePath === '' ? $route->getRoutePath(true) : $route->controller->group() . '/' . $routePath;
    }
protected function normalizeRoutePath($routePath)
    {
        $routePath = Reaction::$app->getAlias((string) $routePath);
        if (strncmp($routePath, '/', 1) === 0) {
            // absolute route
            return $routePath;
        }

        $route = $this->app->getRoute();

        // relative route
        if ($route === null || $route->controller === null) {
            throw new InvalidArgumentException("Unable to resolve the relative route: $routePath. No active controller is available.");
        }

        return $routePath === '' ? $route->getRoutePath(true) : $route->controller->group() . '/' . $routePath;
    }
protected function normalizeRoutePath ( $ routePath ) { $ routePath = Reaction :: $ app -> getAlias ( ( string ) $ routePath ) ; if ( strncmp ( $ routePath , '/' , 1 ) === 0 ) { // absolute route return $ routePath ; } $ route = $ this -> app -> getRoute ( ) ; // relative route if ( $ route === null || $ route -> controller === null ) { throw new InvalidArgumentException ( "Unable to resolve the relative route: $routePath. No active controller is available." ) ; } return $ routePath === '' ? $ route -> getRoutePath ( true ) : $ route -> controller -> group ( ) . '/' . $ routePath ; }
Normalizes route and makes it suitable for UrlManager. Absolute routes are staying as is
while relative routes are converted to absolute ones.

A relative route is a route without a leading slash, such as "view", "post/view".

- If the route is an empty string, the current [[\yii\web\Controller::route|route]] will be used;
- If the route contains no slashes at all, it is considered to be an action ID
of the current controller and will be prepended with [[\yii\web\Controller::uniqueId]];
- If the route has no leading slash, it is considered to be a route relative
to the current module and will be prepended with the module's uniqueId.

A route can also be specified as an alias. In this case, the alias
will be converted into the actual route first before conducting the above transformation steps.

@param string              $routePath the route. This can be either an absolute route or a relative route.
@return string normalized  route suitable for UrlManager
Normalizes route and makes it suitable for UrlManager . Absolute routes are staying as is while relative routes are converted to absolute ones .