class StubThemeHandler
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler
- 10 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler
- 11.x core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler
Extends the default theme handler to mock some drupal_ methods.
Hierarchy
- class \Drupal\Core\Extension\ThemeHandler implements \Drupal\Core\Extension\ThemeHandlerInterface
- class \Drupal\Tests\Core\Extension\StubThemeHandler extends \Drupal\Core\Extension\ThemeHandler
Expanded class hierarchy of StubThemeHandler
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ ThemeHandlerTest.php, line 117
Namespace
Drupal\Tests\Core\ExtensionView source
class StubThemeHandler extends ThemeHandler {
/**
* Whether the CSS cache was cleared.
*
* @var bool
*/
protected $clearedCssCache;
/**
* Whether the registry should be rebuilt.
*
* @var bool
*/
protected $registryRebuild;
/**
* {@inheritdoc}
*/
protected function clearCssCache() {
$this->clearedCssCache = TRUE;
}
/**
* {@inheritdoc}
*/
protected function themeRegistryRebuild() {
$this->registryRebuild = TRUE;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
StubThemeHandler::$clearedCssCache | protected | property | Whether the CSS cache was cleared. | |
StubThemeHandler::$registryRebuild | protected | property | Whether the registry should be rebuilt. | |
StubThemeHandler::clearCssCache | protected | function | ||
StubThemeHandler::themeRegistryRebuild | protected | function | ||
ThemeHandler::$configFactory | protected | property | The config factory to get the installed themes. | |
ThemeHandler::$list | protected | property | A list of all currently available themes. | |
ThemeHandler::$root | protected | property | The app root. | |
ThemeHandler::$themeList | protected | property | An extension discovery instance. | |
ThemeHandler::addTheme | public | function | Adds a theme extension to the internal listing. | Overrides ThemeHandlerInterface::addTheme |
ThemeHandler::getBaseThemes | public | function | Finds all the base themes for the specified theme. | Overrides ThemeHandlerInterface::getBaseThemes |
ThemeHandler::getDefault | public | function | Returns the default theme. | Overrides ThemeHandlerInterface::getDefault |
ThemeHandler::getName | public | function | Gets the human readable name of a given theme. | Overrides ThemeHandlerInterface::getName |
ThemeHandler::getTheme | public | function | Returns a theme extension object from the currently active theme list. | Overrides ThemeHandlerInterface::getTheme |
ThemeHandler::getThemeDirectories | public | function | Returns an array of directories for all installed themes. | Overrides ThemeHandlerInterface::getThemeDirectories |
ThemeHandler::hasUi | public | function | Determines if a theme should be shown in the user interface. | Overrides ThemeHandlerInterface::hasUi |
ThemeHandler::install | public | function | Installs a given list of themes. | Overrides ThemeHandlerInterface::install |
ThemeHandler::listInfo | public | function | Returns a list of currently installed themes. | Overrides ThemeHandlerInterface::listInfo |
ThemeHandler::rebuildThemeData | public | function | Scans and collects theme extension data and their engines. | Overrides ThemeHandlerInterface::rebuildThemeData |
ThemeHandler::refreshInfo | public | function | Refreshes the theme info data of currently installed themes. | Overrides ThemeHandlerInterface::refreshInfo |
ThemeHandler::reset | public | function | Resets the internal state of the theme handler. | Overrides ThemeHandlerInterface::reset |
ThemeHandler::setDefault | public | function | Sets a new default theme. | Overrides ThemeHandlerInterface::setDefault |
ThemeHandler::themeExists | public | function | Determines whether a given theme is installed. | Overrides ThemeHandlerInterface::themeExists |
ThemeHandler::uninstall | public | function | Uninstalls a given list of themes. | Overrides ThemeHandlerInterface::uninstall |
ThemeHandler::__construct | public | function | Constructs a new ThemeHandler. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.