function ThemeRegistryLoader::getCacheKey

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Template/Loader/ThemeRegistryLoader.php \Drupal\Core\Template\Loader\ThemeRegistryLoader::getCacheKey()
  2. 10 core/lib/Drupal/Core/Template/Loader/ThemeRegistryLoader.php \Drupal\Core\Template\Loader\ThemeRegistryLoader::getCacheKey()

File

core/lib/Drupal/Core/Template/Loader/ThemeRegistryLoader.php, line 75

Class

ThemeRegistryLoader
Loads templates based on information from the Drupal theme registry.

Namespace

Drupal\Core\Template\Loader

Code

public function getCacheKey(string $name) : string {
    // The parent implementation does unnecessary work that triggers
    // deprecations in PHP 8.1.
    return $this->findTemplate($name) ?: '';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.