class StubThemeHandler in Drupal 9
Same name and namespace in other branches
- 8 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 ThemeHandlerInterface
- class \Drupal\Tests\Core\Extension\StubThemeHandler
Expanded class hierarchy of StubThemeHandler
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ThemeHandlerTest.php, line 117 - Contains \Drupal\Tests\Core\Extension\ThemeHandlerTest.
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StubThemeHandler:: |
protected | property | Whether the CSS cache was cleared. | |
StubThemeHandler:: |
protected | property | Whether the registry should be rebuilt. | |
StubThemeHandler:: |
protected | function | ||
StubThemeHandler:: |
protected | function | ||
ThemeHandler:: |
protected | property | The config factory to get the installed themes. | |
ThemeHandler:: |
protected | property | A list of all currently available themes. | |
ThemeHandler:: |
protected | property | The app root. | |
ThemeHandler:: |
protected | property | An extension discovery instance. | |
ThemeHandler:: |
public | function |
Adds a theme extension to the internal listing. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Finds all the base themes for the specified theme. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Returns the default theme. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Gets the human readable name of a given theme. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Returns a theme extension object from the currently active theme list. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Returns an array of directories for all installed themes. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Determines if a theme should be shown in the user interface. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Returns a list of currently installed themes. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Scans and collects theme extension data and their engines. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Refreshes the theme info data of currently installed themes. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Resets the internal state of the theme handler. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function |
Determines whether a given theme is installed. Overrides ThemeHandlerInterface:: |
|
ThemeHandler:: |
public | function | Constructs a new ThemeHandler. |