ThemeHandler::getName
public function ThemeHandler::getName
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 429
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']; }
© 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