ae79b505ea1800000caebc207f237a983385d737
[yaffs-website] / web / core / lib / Drupal / Core / Extension / ThemeInstallerInterface.php
1 <?php
2
3 namespace Drupal\Core\Extension;
4
5 /**
6  * Manages theme installation/uninstallation.
7  */
8 interface ThemeInstallerInterface {
9
10   /**
11    * Installs a given list of themes.
12    *
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.
19    *
20    * @return bool
21    *   Whether any of the given themes have been installed.
22    *
23    * @throws \Drupal\Core\Extension\ExtensionNameLengthException
24    *   Thrown when the theme name is to long.
25    *
26    * @throws \Drupal\Core\Extension\Exception\UnknownExtensionException
27    *   Thrown when the theme does not exist.
28    */
29   public function install(array $theme_list, $install_dependencies = TRUE);
30
31   /**
32    * Uninstalls a given list of themes.
33    *
34    * Uninstalling a theme removes all related configuration (like blocks) and
35    * invokes the 'themes_uninstalled' hook.
36    *
37    * @param array $theme_list
38    *   The themes to uninstall.
39    *
40    * @throws \Drupal\Core\Extension\Exception\UnknownExtensionException
41    *   Thrown when trying to uninstall a theme that was not installed.
42    *
43    * @throws \InvalidArgumentException
44    *   Thrown when trying to uninstall the default theme or the admin theme.
45    *
46    * @see hook_themes_uninstalled()
47    */
48   public function uninstall(array $theme_list);
49
50 }