Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.

This commit is contained in:
Pantheon Automation 2015-11-17 13:42:33 -08:00 committed by Greg Anderson
parent 4afb23bbd3
commit 7784f4c23d
929 changed files with 19798 additions and 5304 deletions

View file

@ -483,4 +483,18 @@ class ThemeHandler implements ThemeHandlerInterface {
throw new \InvalidArgumentException(sprintf('The theme %s does not exist.', $name));
}
/**
* {@inheritdoc}
*/
public function hasUi($name) {
$themes = $this->listInfo();
if (isset($themes[$name])) {
if (!empty($themes[$name]->info['hidden'])) {
$theme_config = $this->configFactory->get('system.theme');
return $name == $theme_config->get('default') || $name == $theme_config->get('admin');
}
return TRUE;
}
return FALSE;
}
}

View file

@ -208,4 +208,18 @@ interface ThemeHandlerInterface {
*/
public function getTheme($name);
/**
* Determines if a theme should be shown in the user interface.
*
* To be shown in the UI the theme has to be installed. If the theme is hidden
* it will not be shown unless it is the default or admin theme.
*
* @param string $name
* The name of the theme to check.
*
* @return bool
* TRUE if the theme should be shown in the UI, FALSE if not.
*/
public function hasUi($name);
}