function ThemeInstallerInterface::getThemesToUninstall

Determines the full set of themes to uninstall for the given list.

Parameters

string[] $theme_list: An array of theme machine names.

bool $uninstall_dependents: (optional) If TRUE, installed sub-themes of the given themes are added to the returned list. If FALSE, an exception is thrown when a given base theme has an installed sub-theme that is not also in the list.

Return value

string[] The machine names of the themes to uninstall, including any added sub-themes.

Throws

\Drupal\Core\Extension\Exception\UnknownExtensionException Thrown when a requested theme is not installed.

\InvalidArgumentException Thrown when trying to uninstall the admin theme, the default theme or, when $uninstall_dependents is FALSE, a theme that another theme depends on.

File

core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php, line 105

Class

ThemeInstallerInterface
Manages theme installation/uninstallation.

Namespace

Drupal\Core\Extension

Code

public function getThemesToUninstall(array $theme_list, bool $uninstall_dependents = TRUE) : array;

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