Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ThemeHandler.php

function ThemeHandler::getTheme

Overrides ThemeHandlerInterface::getTheme

File

core/lib/Drupal/Core/Extension/ThemeHandler.php, line 178

Class

ThemeHandler
Default theme handler using the config system to store installation statuses.

Namespace

Drupal\Core\Extension

Code

public function getTheme($name) {
    $themes = $this->listInfo();
    if (isset($themes[$name])) {
        return $themes[$name];
    }
    throw new UnknownExtensionException(sprintf('The theme %s does not exist.', $name));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal