models/ModulesManager.php
protected function fixUrlPrefixes($moduleUid, $routesConfig)
    {
        $result = [];
        $module = Yii::$app->getModule($moduleUid);
        foreach ($routesConfig as $type => $config) {
            $urlPrefix = RoutesBuilder::correctUrlPrefix('', $module, $type);
            if (!empty($urlPrefix)) {
                if (is_string($config)) {
                    //$config = $urlPrefix . '/' . $config;
                    $config = $urlPrefix;
                } elseif (is_array($config)) {
                    //$config['urlPrefix'] = empty($config['urlPrefix']) ? $urlPrefix : $urlPrefix . '/' . $config['urlPrefix'];
                    $config['urlPrefix'] = $urlPrefix;
                }
            }
            $result[$type] = $config;
        }
        return $result;
    }
protected function fixUrlPrefixes($moduleUid, $routesConfig)
    {
        $result = [];
        $module = Yii::$app->getModule($moduleUid);
        foreach ($routesConfig as $type => $config) {
            $urlPrefix = RoutesBuilder::correctUrlPrefix('', $module, $type);
            if (!empty($urlPrefix)) {
                if (is_string($config)) {
                    //$config = $urlPrefix . '/' . $config;
                    $config = $urlPrefix;
                } elseif (is_array($config)) {
                    //$config['urlPrefix'] = empty($config['urlPrefix']) ? $urlPrefix : $urlPrefix . '/' . $config['urlPrefix'];
                    $config['urlPrefix'] = $urlPrefix;
                }
            }
            $result[$type] = $config;
        }
        return $result;
    }
protected function fixUrlPrefixes ( $ moduleUid , $ routesConfig ) { $ result = [ ] ; $ module = Yii :: $ app -> getModule ( $ moduleUid ) ; foreach ( $ routesConfig as $ type => $ config ) { $ urlPrefix = RoutesBuilder :: correctUrlPrefix ( '' , $ module , $ type ) ; if ( ! empty ( $ urlPrefix ) ) { if ( is_string ( $ config ) ) { //$config = $urlPrefix . '/' . $config; $ config = $ urlPrefix ; } elseif ( is_array ( $ config ) ) { //$config['urlPrefix'] = empty($config['urlPrefix']) ? $urlPrefix : $urlPrefix . '/' . $config['urlPrefix']; $ config [ 'urlPrefix' ] = $ urlPrefix ; } } $ result [ $ type ] = $ config ; } return $ result ; }
Correct URL prefixes
Correct URL prefixes