function ThemeHandler::listInfo

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Extension/ThemeHandler.php \Drupal\Core\Extension\ThemeHandler::listInfo()

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)) {
      $installed_themes = array_intersect_key($this->themeList
        ->getList(), $installed_themes);
      array_map([
        $this,
        'addTheme',
      ], $installed_themes);
    }
  }
  return $this->list;
}

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