You are here

protected function ThemeExtensionList::getInstalledExtensionNames in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/ThemeExtensionList.php \Drupal\Core\Extension\ThemeExtensionList::getInstalledExtensionNames()

Returns a list of machine names of installed extensions.

Return value

string[] The machine names of all installed extensions of this type.

Overrides ExtensionList::getInstalledExtensionNames

File

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

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);
}