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. 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 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() {
        $this->clearedCssCache = TRUE;
    }
    
    /**
     * {@inheritdoc}
     */
    protected function themeRegistryRebuild() {
        $this->registryRebuild = TRUE;
    }

}

Members

Title Sort descending Modifiers Object type Summary
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
ThemeHandler::getBaseThemes public function
ThemeHandler::getDefault public function
ThemeHandler::getName public function
ThemeHandler::getTheme public function
ThemeHandler::getThemeDirectories public function
ThemeHandler::hasUi public function
ThemeHandler::listInfo public function
ThemeHandler::rebuildThemeData public function
ThemeHandler::refreshInfo public function
ThemeHandler::reset public function
ThemeHandler::themeExists public function
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.