function ThemeExtensionList::getInstalledExtensionNames

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Extension/ThemeExtensionList.php \Drupal\Core\Extension\ThemeExtensionList::getInstalledExtensionNames()
  2. 10 core/lib/Drupal/Core/Extension/ThemeExtensionList.php \Drupal\Core\Extension\ThemeExtensionList::getInstalledExtensionNames()
  3. 11.x core/lib/Drupal/Core/Extension/ThemeExtensionList.php \Drupal\Core\Extension\ThemeExtensionList::getInstalledExtensionNames()

Overrides ExtensionList::getInstalledExtensionNames

File

core/lib/Drupal/Core/Extension/ThemeExtensionList.php, line 293

Class

ThemeExtensionList
Provides a list of available themes.

Namespace

Drupal\Core\Extension

Code

protected function getInstalledExtensionNames() {
    // Cache the installed themes to avoid multiple calls to the config system.
    if (!isset($this->installedThemes)) {
        $this->installedThemes = $this->configFactory
            ->get('core.extension')
            ->get('theme') ?: [];
    }
    return array_keys($this->installedThemes);
}

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