public function WebformThemeManager::hasActiveTheme in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformThemeManager.php \Drupal\webform\WebformThemeManager::hasActiveTheme()
Determine if the current request has an active theme.
Return value
bool TRUE if the current request has an active theme.
Overrides WebformThemeManagerInterface::hasActiveTheme
File
- src/
WebformThemeManager.php, line 133
Class
- WebformThemeManager
- Defines a class to manage webform theming.
Namespace
Drupal\webformCode
public function hasActiveTheme() {
// If there is no route match, then there is no active theme.
// If there is no route match the admin theme can't be initialized.
// @see \Drupal\Core\Theme\ThemeManager::initTheme
// @see \Drupal\Core\Theme\ThemeNegotiator::determineActiveTheme
// @see \Drupal\user\Theme\AdminNegotiator::applies
return \Drupal::routeMatch()
->getRouteName() ? TRUE : FALSE;
}