private function GenerateTheme::getThemeInfo in Drupal 9
Gets theme info using the theme name.
Parameters
string $theme: The machine name of the theme.
Return value
\Drupal\Core\Extension\Extension|null
1 call to GenerateTheme::getThemeInfo()
- GenerateTheme::execute in core/
lib/ Drupal/ Core/ Command/ GenerateTheme.php
File
- core/
lib/ Drupal/ Core/ Command/ GenerateTheme.php, line 266
Class
- GenerateTheme
- Generates a new theme based on latest default markup.
Namespace
Drupal\Core\CommandCode
private function getThemeInfo(string $theme) : ?Extension {
$extension_discovery = new ExtensionDiscovery($this->root, FALSE, []);
$themes = $extension_discovery
->scan('theme');
if (!isset($themes[$theme])) {
return NULL;
}
return $themes[$theme];
}