diff options
Diffstat (limited to 'core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php')
-rw-r--r-- | core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php index 96b636c..74f9ad2 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php @@ -139,4 +139,39 @@ interface ThemeHandlerInterface { */ public function getDefault(); + /** + * Returns an array of directories for all enabled themes. + * + * Useful for tasks such as finding a file that exists in all theme + * directories. + * + * @return array + */ + public function getThemeDirectories(); + + /** + * Determines whether a given theme is enabled. + * + * @param string $theme + * The name of the theme (without the .theme extension). + * + * @return bool + * TRUE if the theme is both installed and enabled. + */ + public function themeExists($theme); + + /** + * Returns a theme extension object from the currently active theme list. + * + * @param string $name + * The name of the theme to return. + * + * @return \Drupal\Core\Extension\Extension + * An extension object. + * + * @throws \InvalidArgumentException + * Thrown when the requested theme does not exist. + */ + public function getTheme($name); + } |