function ThemeHandler::listInfo

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ThemeHandler.php \Drupal\Core\Extension\ThemeHandler::listInfo()
  2. 8.9.x core/lib/Drupal/Core/Extension/ThemeHandler.php \Drupal\Core\Extension\ThemeHandler::listInfo()
  3. 11.x core/lib/Drupal/Core/Extension/ThemeHandler.php \Drupal\Core\Extension\ThemeHandler::listInfo()
4 calls to ThemeHandler::listInfo()
ThemeHandler::getTheme in core/lib/Drupal/Core/Extension/ThemeHandler.php
ThemeHandler::getThemeDirectories in core/lib/Drupal/Core/Extension/ThemeHandler.php
ThemeHandler::hasUi in core/lib/Drupal/Core/Extension/ThemeHandler.php
ThemeHandler::themeExists in core/lib/Drupal/Core/Extension/ThemeHandler.php

File

core/lib/Drupal/Core/Extension/ThemeHandler.php, line 67

Class

ThemeHandler
Default theme handler using the config system to store installation statuses.

Namespace

Drupal\Core\Extension

Code

public function listInfo() {
    if (!isset($this->list)) {
        $this->list = [];
        $installed_themes = $this->configFactory
            ->get('core.extension')
            ->get('theme');
        if (!empty($installed_themes)) {
            $list = $this->themeList
                ->getList();
            foreach (array_keys($installed_themes) as $theme_name) {
                $this->addTheme($list[$theme_name]);
            }
        }
    }
    return $this->list;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.