app/Module/ModuleThemeTrait.php
public function menuThemes(): ?Menu
    {
        $themes = app(ModuleService::class)->findByInterface(ModuleThemeInterface::class, false, true);

        $current_theme = app(ModuleThemeInterface::class);

        if ($themes->count() > 1) {
            $submenus = $themes->map(static function (ModuleThemeInterface $theme) use ($current_theme): Menu {
                $active     = $theme->name() === $current_theme->name();
                $class      = 'menu-theme-' . $theme->name() . ($active ? ' active' : '');

                return new Menu($theme->title(), '#', $class, [
                    'onclick'    => 'return false;',
                    'data-theme' => $theme->name(),
                ]);
            });

            return new Menu(I18N::translate('Theme'), '#', 'menu-theme', [], $submenus->all());
        }

        return null;
    }
public function menuThemes(): ?Menu
    {
        $themes = app(ModuleService::class)->findByInterface(ModuleThemeInterface::class, false, true);

        $current_theme = app(ModuleThemeInterface::class);

        if ($themes->count() > 1) {
            $submenus = $themes->map(static function (ModuleThemeInterface $theme) use ($current_theme): Menu {
                $active     = $theme->name() === $current_theme->name();
                $class      = 'menu-theme-' . $theme->name() . ($active ? ' active' : '');

                return new Menu($theme->title(), '#', $class, [
                    'onclick'    => 'return false;',
                    'data-theme' => $theme->name(),
                ]);
            });

            return new Menu(I18N::translate('Theme'), '#', 'menu-theme', [], $submenus->all());
        }

        return null;
    }
public function menuThemes ( ) : ? Menu { $ themes = app ( ModuleService :: class ) -> findByInterface ( ModuleThemeInterface :: class , false , true ) ; $ current_theme = app ( ModuleThemeInterface :: class ) ; if ( $ themes -> count ( ) > 1 ) { $ submenus = $ themes -> map ( static function ( ModuleThemeInterface $ theme ) use ( $ current_theme ) : Menu { $ active = $ theme -> name ( ) === $ current_theme -> name ( ) ; $ class = 'menu-theme-' . $ theme -> name ( ) . ( $ active ? ' active' : '' ) ; return new Menu ( $ theme -> title ( ) , '#' , $ class , [ 'onclick' => 'return false;' , 'data-theme' => $ theme -> name ( ) , ] ) ; } ) ; return new Menu ( I18N :: translate ( 'Theme' ) , '#' , 'menu-theme' , [ ] , $ submenus -> all ( ) ) ; } return null ; }
Themes menu.

@return Menu|null
Themes menu .