class StubThemeHandler

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler
  2. 8.9.x core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler
  3. 10 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler

Extends the default theme handler to mock some drupal_ methods.

Hierarchy

Expanded class hierarchy of StubThemeHandler

File

core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php, line 116

Namespace

Drupal\Tests\Core\Extension
View 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() : void {
        $this->clearedCssCache = TRUE;
    }
    
    /**
     * {@inheritdoc}
     */
    protected function themeRegistryRebuild() : void {
        $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 Overrides ThemeHandlerInterface::addTheme
ThemeHandler::getBaseThemes public function Overrides ThemeHandlerInterface::getBaseThemes
ThemeHandler::getDefault public function Overrides ThemeHandlerInterface::getDefault
ThemeHandler::getName public function Overrides ThemeHandlerInterface::getName
ThemeHandler::getTheme public function Overrides ThemeHandlerInterface::getTheme
ThemeHandler::getThemeDirectories public function Overrides ThemeHandlerInterface::getThemeDirectories
ThemeHandler::hasUi public function Overrides ThemeHandlerInterface::hasUi
ThemeHandler::listInfo public function Overrides ThemeHandlerInterface::listInfo
ThemeHandler::rebuildThemeData public function Overrides ThemeHandlerInterface::rebuildThemeData
ThemeHandler::refreshInfo public function Overrides ThemeHandlerInterface::refreshInfo
ThemeHandler::reset public function Overrides ThemeHandlerInterface::reset
ThemeHandler::themeExists public function Overrides ThemeHandlerInterface::themeExists
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.