function ExtensionListTestTrait::getThemePath
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/ExtensionListTestTrait.php \Drupal\Tests\ExtensionListTestTrait::getThemePath()
- 10 core/tests/Drupal/Tests/ExtensionListTestTrait.php \Drupal\Tests\ExtensionListTestTrait::getThemePath()
Gets the path for the specified theme.
Parameters
string $theme_name: The theme name.
Return value
string The Drupal-root relative path to the theme directory.
Throws
\Drupal\Core\Extension\Exception\UnknownExtensionException If the theme does not exist.
File
-
core/
tests/ Drupal/ Tests/ ExtensionListTestTrait.php, line 38
Class
- ExtensionListTestTrait
- Provides extension list methods.
Namespace
Drupal\TestsCode
protected function getThemePath(string $theme_name) : string {
return \Drupal::service('extension.list.theme')->getPath($theme_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.