public static function modulesNamesList($module = null, $onlyActivated = true, $forModmgr = false
      , $onlyUniModule = false, $onlyLoaded = false, $indent = '. ')
    {
        $list = [];
        if (empty($module)) {
            $module = Yii::$app;
        }

        $modmgr = static::instance();

        if (method_exists ($modmgr, 'registeredModuleName')) {
            $label = $modmgr::registeredModuleName($module->uniqueId);
        }
        if (empty($label) && $module instanceof UniModule) {
            $label = $module->inform('label');
        }
        if (empty($label)) {
                $label = Yii::t(self::$tc, 'Module') . ' ' . $module->uniqueId;
        }

        if ($module != Yii::$app) { // skip application itself
            if (!$onlyUniModule || $module instanceof UniModule) {
                $prefix = str_repeat($indent, count(explode('/', $module->uniqueId)));
                $muid = $module->uniqueId;
                if ($forModmgr) {
                    $muid = $modmgr::tonumberModuleUniqueId($muid);
                }
                $list[$muid] = $prefix . $label;
            }
        }

        $staticSubmodules = $module->modules;
        $dynSubmodules = $modmgr->getSubmodules($module, $onlyActivated);
        $module->modules = ArrayHelper::merge($dynSubmodules, $staticSubmodules);
        if (empty($module->modules)) {
            return $list;
        }

        // add submodules list
        foreach ($module->modules as $childId => $childModule) {
            if (!$onlyLoaded && is_array($childModule)) {
                $childModule = $module->getModule($childId);
                //$childModule = Yii::$app->getModule($module->uniqueId . '/' . $childId);
            }
            if ($childModule instanceof YiiBaseModule) {
                $list += static::modulesNamesList($childModule, $onlyActivated, $forModmgr, $onlyUniModule, $onlyLoaded, $indent);
            }
        }
        return $list;
    }