function ThemeInstallerInterface::install

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php \Drupal\Core\Extension\ThemeInstallerInterface::install()
  2. 8.9.x core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php \Drupal\Core\Extension\ThemeInstallerInterface::install()
  3. 11.x core/lib/Drupal/Core/Extension/ThemeInstallerInterface.php \Drupal\Core\Extension\ThemeInstallerInterface::install()

Installs a given list of themes.

Parameters

array $theme_list: An array of theme names.

bool $install_dependencies: (optional) If TRUE, dependencies will automatically be installed in the correct order. This incurs a significant performance cost, so use FALSE if you know $theme_list is already complete and in the correct order.

Return value

bool Whether any of the given themes have been installed.

Throws

\Drupal\Core\Extension\ExtensionNameLengthException Thrown when a theme's name is longer than DRUPAL_EXTENSION_NAME_MAX_LENGTH.

\Drupal\Core\Extension\ExtensionNameReservedException Thrown when a theme's name is already used by an installed module.

\Drupal\Core\Extension\Exception\UnknownExtensionException Thrown when the theme does not exist.

\Drupal\Core\Extension\MissingDependencyException Thrown when a requested dependency can't be found.

File

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

Class

ThemeInstallerInterface
Manages theme installation/uninstallation.

Namespace

Drupal\Core\Extension

Code

public function install(array $theme_list, $install_dependencies = TRUE);

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