src/Bootstrap.php
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);
    }
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);
    }
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 ) ; }
Filters bootstraps in `themes` folder.

If the current theme exist in `Yii::$app->extensions`, remove out.
In other words, if a theme has been registered in the themes table `theme/thems`, you do not need to perform bootstrap.

@param string $themesRootPath e.g. `themes`
@param string $bootstrapPathFile e.g. `src\Bootstrap`
@param string $bootstrapPathPattern e.g. `{theme-path}\{bootstrap-path-file}`
Filters bootstraps in themes folder .