function ThemeHandlerInterface::setDefault

Sets a new default theme.

Parameters

string $theme: The new default theme.

Return value

$this

Deprecated

in drupal:8.2.0 and is removed from drupal:9.0.0. Use the configuration system to edit the system.theme config directly.

See also

https://www.drupal.org/node/3082630

1 method overrides ThemeHandlerInterface::setDefault()
ThemeHandler::setDefault in core/lib/Drupal/Core/Extension/ThemeHandler.php
Sets a new default theme.

File

core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php, line 177

Class

ThemeHandlerInterface
Manages the list of available themes.

Namespace

Drupal\Core\Extension

Code

public function setDefault($theme);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.