You are here

class StubThemeHandler in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 297
Contains \Drupal\Tests\Core\Extension\ThemeHandlerTest.

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;

  /**
   * A list of themes keyed by name.
   *
   * @var array
   */
  protected $systemList;

  /**
   * {@inheritdoc}
   */
  protected function clearCssCache() {
    $this->clearedCssCache = TRUE;
  }

  /**
   * {@inheritdoc}
   */
  protected function themeRegistryRebuild() {
    $this->registryRebuild = TRUE;
  }

  /**
   * {@inheritdoc}
   */
  protected function systemThemeList() {
    return $this->systemList;
  }

  /**
   * {@inheritdoc}
   */
  protected function systemListReset() {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StubThemeHandler::$clearedCssCache protected property Whether the CSS cache was cleared.
StubThemeHandler::$registryRebuild protected property Whether the registry should be rebuilt.
StubThemeHandler::$systemList protected property A list of themes keyed by name.
StubThemeHandler::clearCssCache protected function
StubThemeHandler::systemListReset protected function Wraps system_list_reset(). Overrides ThemeHandler::systemListReset
StubThemeHandler::systemThemeList protected function Wraps system_list(). Overrides ThemeHandler::systemThemeList
StubThemeHandler::themeRegistryRebuild protected function
ThemeHandler::$configFactory protected property The config factory to get the installed themes.
ThemeHandler::$configInstaller protected property The config installer to install configuration.
ThemeHandler::$configManager protected property The config manager used to uninstall a theme.
ThemeHandler::$cssCollectionOptimizer protected property The CSS asset collection optimizer service.
ThemeHandler::$defaultFeatures protected property Contains the features enabled for themes by default.
ThemeHandler::$extensionDiscovery protected property An extension discovery instance.
ThemeHandler::$infoParser protected property The info parser to parse the theme.info.yml files.
ThemeHandler::$list protected property A list of all currently available themes.
ThemeHandler::$logger protected property A logger instance.
ThemeHandler::$moduleHandler protected property The module handler to fire themes_installed/themes_uninstalled hooks.
ThemeHandler::$root protected property The app root.
ThemeHandler::$routeBuilder protected property The route builder to rebuild the routes if a theme is installed.
ThemeHandler::$state protected property The state backend.
ThemeHandler::addTheme public function Adds a theme extension to the internal listing. Overrides ThemeHandlerInterface::addTheme
ThemeHandler::doGetBaseThemes protected function Finds the base themes for the specific theme.
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::getExtensionDiscovery protected function Returns an extension discovery object.
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.