public ThemeHandler::getName($theme)
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
Class
- ThemeHandler
- Default theme handler using the config system to store installation statuses.
Namespace
Drupal\Core\Extension
Code
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']; }
Please login to continue.