getEditable('system.theme') * ->set('default', $theme) * ->save(); * @endcode */ public function setDefault($theme); /** * Returns an array of directories for all installed themes. * * Useful for tasks such as finding a file that exists in all theme * directories. * * @return array */ public function getThemeDirectories(); /** * Determines whether a given theme is installed. * * @param string $theme * The name of the theme (without the .theme extension). * * @return bool * TRUE if the theme is installed. */ public function themeExists($theme); /** * Returns a theme extension object from the currently active theme list. * * @param string $name * The name of the theme to return. * * @return \Drupal\Core\Extension\Extension * An extension object. * * @throws \InvalidArgumentException * Thrown when the requested theme does not exist. */ public function getTheme($name); /** * Determines if a theme should be shown in the user interface. * * To be shown in the UI the theme has to be installed. If the theme is hidden * it will not be shown unless it is the default or admin theme. * * @param string $name * The name of the theme to check. * * @return bool * TRUE if the theme should be shown in the UI, FALSE if not. */ public function hasUi($name); }