public function WebformShareThemeNegotiator::determineActiveTheme in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_share/src/Theme/WebformShareThemeNegotiator.php \Drupal\webform_share\Theme\WebformShareThemeNegotiator::determineActiveTheme()
Determine the active theme for the request.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match object.
Return value
string|null The name of the theme, or NULL if other negotiators, like the configured default one, should be used instead.
Overrides ThemeNegotiatorInterface::determineActiveTheme
File
- modules/
webform_share/ src/ Theme/ WebformShareThemeNegotiator.php, line 45
Class
- WebformShareThemeNegotiator
- Sets the theme for the webform share page.
Namespace
Drupal\webform_share\ThemeCode
public function determineActiveTheme(RouteMatchInterface $route_match) {
/** @var \Drupal\webform\WebformInterface $webform */
$webform = $route_match
->getParameter('webform');
return $webform
->getSetting('share_theme_name', TRUE) ?: $this->configFactory
->get('system.theme')
->get('default');
}