public ThemeHandler::getName($theme)
Gets the human readable name of a given theme.
string $theme: The machine name of the theme which title should be shown.
string Returns the human readable name of the theme.
Overrides ThemeHandlerInterface::getName
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'];
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Extension!ThemeHandler.php/function/ThemeHandler::getName/8.1.x