public function ThemeHandler::getName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Extension/ThemeHandler.php \Drupal\Core\Extension\ThemeHandler::getName()
Gets the human readable name of a given theme.
Parameters
string $theme: The machine name of the theme which title should be shown.
Return value
string Returns the human readable name of the theme.
Overrides ThemeHandlerInterface::getName
File
- core/
lib/ Drupal/ Core/ Extension/ ThemeHandler.php, line 431 - Contains \Drupal\Core\Extension\ThemeHandler.
Class
- ThemeHandler
- Default theme handler using the config system to store installation statuses.
Namespace
Drupal\Core\ExtensionCode
public function getName($theme) {
$themes = $this
->listInfo();
if (!isset($themes[$theme])) {
throw new \InvalidArgumentException("Requested the name of a non-existing theme {$theme}");
}
return $themes[$theme]->info['name'];
}