Module::getThemes

@return array
431110
public function getThemes()
    {
        $directory = new SplDirectoryInfo($this->getResourcesDir() . 'themes' . DIRECTORY_SEPARATOR);

        $themes = [];
        foreach ($directory->getTree() as $themeName => $themeTree) {
            if (($theme = $this->getTheme($themeName)) instanceof Module\Theme) {
                $themes[ $themeName ] = $theme;
            }
        }

        return $themes;
    }
106126
public static function getActiveTheme()
    {
        if (self::$activeThemeCache !== false) {
            return self::$activeThemeCache;
        }

        $theme = static::load(static::getActiveThemeCode());

        if (!File::isDirectory($theme->getPath())) {
            return self::$activeThemeCache = null;
        }

        return self::$activeThemeCache = $theme;
    }
108260
protected function getThemesConfig()
    {
        $config = $this->serviceLocator->get('config');

        $myConfig = $config['Rcm'];

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

        return $myConfig['themes'];
    }
332911
public function getStylesheets()
    {
        $parse_stylesheets = function ($params, $stylesheets) {
            foreach ($params as $css) {
                if (is_string($css)) {
                    $css = array(
                        'path' => $css,
                        'media' => 'all',
                    );
                }

                $stylesheets[] = $css;
            }

            return $stylesheets;
        };

        // From config.yml
        $stylesheets = $parse_stylesheets(
            $this->getGenerator()->getFromBundleConfig('stylesheets', array()), array()
        );

        // From generator.yml
        $stylesheets = $parse_stylesheets(
            $this->getVariable('stylesheets', array()), $stylesheets
        );

        return $stylesheets;
    }
557580
public function listAction()
    {
        $automaticTheme = $this->addAutomaticTheme();

        $themeMaper = $this->getAdminThemeService();

        $themesActivated = $themeMaper->findActiveTheme();
        $themesNotActivated = $themeMaper->findActiveTheme(false);

        return array('themesActivated'    => $themesActivated,
                     'themesNotActivated' => $themesNotActivated,
                     'automaticTheme'     => $automaticTheme,
                     'flashMessages'      => $this->flashMessenger()->getMessages());
    }
473136
public function getThemeCustomizableStyleList()
    {
        if (!isset($this->styleList)) {
            $env = Environment::get();
            $r = $env->getRecord(
                DIRNAME_THEMES.'/'.$this->getThemeHandle(
                ).'/'.DIRNAME_CSS.'/'.FILENAME_STYLE_CUSTOMIZER_STYLES,
                $this->getPackageHandle()
            );
            $this->styleList = \Concrete\Core\StyleCustomizer\StyleList::loadFromXMLFile($r->file);
        }

        return $this->styleList;
    }
493122
public function allowedThemes()
    {
        if ($themes = self::$allowed_themes) {
            return ArrayLib::valuekey($themes);
        }

        $themes = [];
        if (is_dir(THEMES_PATH)) {
            foreach (scandir(THEMES_PATH) as $theme) {
                if ($theme[0] == '.') {
                    continue;
                }
                $theme = strtok($theme, '_');
                $themes[$theme] = $theme;
            }
            ksort($themes);
        }
        return $themes;
    }
35763
public function all() : array
    {
        if ($this->themes !== null) {
            return $this->themes;
        }

        return $this->themes = $this->load();
    }
153256
public function getApplicationModules()
    {
        $modules = [];

        foreach ($this->getModules() as $id => $obj) {
            if ($obj instanceof Module) {
                $modules[$id] = $obj;
            }
        }

        return $modules;
    }
1229399
public function getAllThemes($groups = null)
    {
        $names = $this->getThemeNames();

        $themes = array_combine(
            $names,
            array_map(
                function ($themeName) {
                    return $this->getTheme($themeName);
                },
                $names
            )
        );

        if (!empty($groups)) {
            $groups = is_array($groups) ? $groups : [$groups];
            $themes = array_filter(
                $themes,
                function (Theme $theme) use ($groups) {
                    return count(array_intersect($groups, $theme->getGroups())) > 0;
                }
            );
        }

        return $themes;
    }
280607
protected function getThemeIdFromThemeDetailsProviders()
    {
        $providers = $this->getThemeDetailsProviders();
        foreach ($providers as $provider) {
            if ($provider instanceof ThemeDetailsProviderInterface) {
                $themeId = $provider->getThemeId();
                if (!empty($themeId) && $themeId !== ' ') {
                    if ($this->hasTheme($themeId)) {
                        return $themeId;
                    }

                    \common_Logger::i(
                        'The requested theme ' . $themeId .
                        ' requested by the ' . get_class($provider) . ' provider does not exist!'
                    );
                }
            }
        }

        return '';
    }
359324
public static function getThemesForSelect()
    {
        if (!self::$_initialized) {
            self::init();
        }

        $results = [];
        foreach (self::$_themes as $theme) {
            $results[$theme->id()] = $theme->name();
        }

        return $results;
    }
914222
public function getStylesheets()
    {
        $stylesheets = '';
        foreach ($this->stylesheets as $stylesheet) {
            $stylesheets .= $stylesheet . "\n";
        }
        $stylesheets = rtrim($stylesheets, "\n");
        return $stylesheets;
    }
490035
public static function getKnownStyles()
    {
        $styles = array(
            static::BOLD      => static::BASH_BOLD,
            static::UNDERLINE => static::BASH_UNDERLINE,
            static::BLINK     => static::BASH_BLINK,
            static::INVISIBLE => static::BASH_INVISIBLE,
        );

        return $styles;
    }
110849
public function getModules(){
        if($this->loadModules != 'ALL'){
            $this->connection->select('name');
            $this->connection->from($this->tableModule);
            $modules= $this->connection->get()->fetchAll(\PDO::FETCH_ASSOC);
            foreach ($modules as $module) {
                $this->getModule($module['name']);
            }
            $this->loadModules= 'ALL';
        }
        return $this->modules;
    }
1165151
public function getThemesFromDir()
	{
		$themeList = array();
		$themePath = Yii::getPathOfAlias('webroot.themes');
		$themes    = scandir($themePath);
		foreach($themes as $theme) {
			$themeName = $this->urlTitle($theme);
			$themeFile = $themePath.'/'.$theme.'/'.$themeName.'.yaml';
			if(file_exists($themeFile)) {
				if(!in_array($themeName, $this->getIgnoreTheme())) {
					$themeList[] = $theme;
				}
			}
		}

		if(count($themeList) > 0)
			return $themeList;
		else
			return false;
	}
1079669
function getThemeSupportedLanguages() {

		$return_value = false;

		$fullpath = get_stylesheet_directory() . '/theme-information.php';

		if ( is_file( $fullpath ) ) {

			require( $fullpath );

			if ( ! empty( $supported_languages ) ) {
				$return_value = $supported_languages;
			}
		} else {
			$return_value = get_theme_support( 'pressbooks_global_typography' );
		}

		return $return_value;
	}