public static function filterThemesBootstrap($themesRootPath = 'themes', $bootstrapPathFile = 'src\\Bootstrap', $bootstrapPathPattern = '{theme-path}\\{bootstrap-path-file}') {

    	if (static::$_themeBootstraps === null) {
    		static::$_themeBootstraps = static::findThemeBootstraps($themesRootPath, $bootstrapPathFile, $bootstrapPathPattern);
    	}

        foreach (ThemeManager::getThemes() as $theme) {
            
            ///theme bootstrap class
            $themeBootstrapClass = $theme['namespace'] . '\\Bootstrap'; 

            ///If the current theme exist in `Yii::$app->bootstrap`, remove out.
            ///In other words, if a theme has been registered in the setting table `theme/thems`, you do not need to perform bootstrap.
            $key = array_search($themeBootstrapClass, static::$_themeBootstraps);  
            if ($key !== false) {
                array_splice(static::$_themeBootstraps, $key, 1);
            }

        }

        Yii::$app->bootstrap = array_merge(Yii::$app->bootstrap, static::$_themeBootstraps);
    }