3 namespace Drupal\Core\Extension;
6 * Manages theme installation/uninstallation.
8 interface ThemeInstallerInterface {
11 * Installs a given list of themes.
13 * @param array $theme_list
14 * An array of theme names.
15 * @param bool $install_dependencies
16 * (optional) If TRUE, dependencies will automatically be installed in the
17 * correct order. This incurs a significant performance cost, so use FALSE
18 * if you know $theme_list is already complete and in the correct order.
21 * Whether any of the given themes have been installed.
23 * @throws \Drupal\Core\Extension\ExtensionNameLengthException
24 * Thrown when the theme name is to long.
26 * @throws \Drupal\Core\Extension\Exception\UnknownExtensionException
27 * Thrown when the theme does not exist.
29 public function install(array $theme_list, $install_dependencies = TRUE);
32 * Uninstalls a given list of themes.
34 * Uninstalling a theme removes all related configuration (like blocks) and
35 * invokes the 'themes_uninstalled' hook.
37 * @param array $theme_list
38 * The themes to uninstall.
40 * @throws \Drupal\Core\Extension\Exception\UnknownExtensionException
41 * Thrown when trying to uninstall a theme that was not installed.
43 * @throws \InvalidArgumentException
44 * Thrown when trying to uninstall the default theme or the admin theme.
46 * @see hook_themes_uninstalled()
48 public function uninstall(array $theme_list);