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