Get all themes.

@return array
774057
public function all()
    {
        if ($this->useCache()) {
            return $this->cache->remember($this->getCacheKey(), $this->getCacheLifetime(), function () {
                return $this->scan();
            });
        }

        return $this->scan();
    }
140941
protected function getDefaultTheme()
    {
        if (!is_null($this->default) && array_key_exists($this->default, $this->themes)) {
            return $this->themes[$this->default];
        }

        return false;
    }
1047624
public function all()
    {
        $colors = [];

        foreach ($this->colors as $color => $code) {
            $colors['background_' . $color] = $code + self::ADD;
        }

        return $colors;
    }
574161
protected function getAllResources(): array
    {
        return array_merge($this->resources, [
            $this->socket->getResourceId() => $this->socket->getResource(),
        ]);
    }
397901
public function getThemeConfig()
    {
        if (empty($this->_themeConfig)) {
            $file = $this->getThemeFolder() . 'theme.json';
            $this->_themeConfig = Helper::getConfigFile($file);
        }
        return $this->_themeConfig;
    }
108260
protected function getThemesConfig()
    {
        $config = $this->serviceLocator->get('config');

        $myConfig = $config['Rcm'];

        if (empty($myConfig['themes'])) {
            return [];
        }

        return $myConfig['themes'];
    }
550660
protected function getOptions()
	{
		$path = base_path($this->config->get('theme.themeDir'));

		return array(
			array('path', null, InputOption::VALUE_OPTIONAL, 'Path to theme directory.', $path),
			array('facade', null, InputOption::VALUE_OPTIONAL, 'Facade name.', null),
		);
	}
26531
public static function configs()
    {
        $files = File::allFiles(base_path().'/themes');
        $result = [];
        foreach ($files as $file){
            if($file->getBasename() == "config.json") {
                $result[] = self::getConfig($file->getPath());
            }
        }
        return $result;
    }
540781
public function getThemeEnabled()
    {
        $plugins = $this->getLoadedPlugins();

        $theme = false;
        foreach ($plugins as $plugin) {
            /* @var $plugin Plugin */
            if ($plugin->isTheme()
                && $this->isPluginActivated($plugin->getPluginName())
            ) {
                if ($plugin->getPluginName() != self::DEFAULT_THEME) {
                    return $plugin; // enabled theme (not default)
                }
                $theme = $plugin; // default theme
            }
        }
        return $theme;
    }
319311
public function all($onlyEnabled = false)
    {
        $themes = $this->repository->findAll();

        if ($onlyEnabled) {
            $themes = array_filter($themes, function ($theme) {
                return $theme->isEnabled();
            });

            $pm = $this->pm;
            //then according to plugins

            $themes = array_filter($themes, function ($theme) use ($pm) {
                return $pm->isLoaded($theme->getPlugin());
            });
        }

        return $themes;
    }
906957
public static function get_themes()
    {
        $default = [self::PUBLIC_THEME, self::DEFAULT_THEME];

        if (!SSViewer::config()->uninherited('theme_enabled')) {
            return $default;
        }

        // Explicit list is assigned
        $themes = static::$current_themes;
        if (!isset($themes)) {
            $themes = SSViewer::config()->uninherited('themes');
        }
        if ($themes) {
            return $themes;
        }

        // Support legacy behaviour
        if ($theme = SSViewer::config()->uninherited('theme')) {
            return [self::PUBLIC_THEME, $theme, self::DEFAULT_THEME];
        }

        return $default;
    }
904715
public function getCss()
    {
        if (isset($this->_themeConfig['css'])) {
            return array_merge($this->_themeConfig['css'], $this->_data['css']);
        } else {
            return $this->_data['css'];
        }
    }
733012
public function getTheme()
    {
		if ($this->_theme === null)
		{
			$tname = str_replace( THEME_DIR.'/', '', $this->templateDir );
			if ($tname) {
				$theme = Theme::find($tname);
				if ($theme) $theme->loadConfig($this);				
				$this->_theme = $theme;
			} else {
				$this->_theme = false;
			}
		}
		return $this->_theme;
    }
33478
public function detect()
    {
        $themes  = new Collection();
        $file    = $this->app->make('files');
        $path    = rtrim(__DIR__ . '/../' . array_get($this->config, 'indexes_path', ''));
        $folders = $file->directories($path);
        foreach ($folders as $folder) {
            $templateDir = class_basename($folder);
            $name        = $this->parseThemeNameFromPath($folder);
            $manifest    = new Manifest($file, $this->config + ['dir' => $templateDir], rtrim($folder, '/') . '/');
            $items       = $manifest->items();
            if (is_null($items)) {
                continue;
            }
            $themes[$name] = $items->getAttributes();
        }
        return $themes;
    }
221886
public function getAllStyles()
    {
        $styles = [];
        foreach (self::getRegistry()->getMap() as $id => $styleData ){
            $styles[$id] = $styleData;
        }
        return $styles;
    }
842124
public static function all()
    {
        return array(
            self::ENABLED,
            self::DISABLED,
            self::TYPE_NOT_FOUND,
            self::TYPE_NOT_ENABLED,
            self::INVALID,
        );
    }
731901
public function theme()
    {
        // nothing set, skip theme
        if (!$this->theme || !isset($this->theme->name)) {
            return false;
        }

        // only theme name is set
        if (is_string($this->theme)) {
            return (object)[
                'name'     => $this->theme,
                'mods'     => [],
                'options'  => [],
                'menus'    => [],
                'sidebars' => []
            ];
        }

        // read theme setting
        return (object)[
            'name'     => $this->theme->name,
            'mods'     => isset($this->theme->mods) ? $this->theme->mods : [],
            'options'  => isset($this->theme->options) ? $this->theme->options : [],
            'menus'    => isset($this->theme->menus) ? $this->theme->menus : [],
            'sidebars' => isset($this->theme->sidebars) ? $this->theme->sidebars : []
        ];
    }