protected function ThemeExtensionList::getInstalledExtensionNames in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Extension/ThemeExtensionList.php \Drupal\Core\Extension\ThemeExtensionList::getInstalledExtensionNames()
- 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 293
Class
- ThemeExtensionList
- Provides a list of available themes.
Namespace
Drupal\Core\ExtensionCode
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);
}