class GlazedSettingsThemeNegotiator in Glazed Theme Helper 8
Forces theme settings forms to use the Theme that is being configured
Hierarchy
- class \Drupal\glazed_helper\Theme\GlazedSettingsThemeNegotiator implements ThemeNegotiatorInterface
Expanded class hierarchy of GlazedSettingsThemeNegotiator
1 string reference to 'GlazedSettingsThemeNegotiator'
1 service uses GlazedSettingsThemeNegotiator
File
- src/
Theme/ GlazedSettingsThemeNegotiator.php, line 11
Namespace
Drupal\glazed_helper\ThemeView source
class GlazedSettingsThemeNegotiator implements ThemeNegotiatorInterface {
/**
* {@inheritdoc}
*/
public function applies(RouteMatchInterface $route_match) {
$route = $route_match
->getRouteObject();
return $route && $route
->getPath() == '/admin/appearance/settings/{theme}';
}
/**
* {@inheritdoc}
*/
public function determineActiveTheme(RouteMatchInterface $route_match) {
$current_theme = $route_match
->getParameter('theme');
return $current_theme;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GlazedSettingsThemeNegotiator:: |
public | function |
Whether this theme negotiator should be used to set the theme. Overrides ThemeNegotiatorInterface:: |
|
GlazedSettingsThemeNegotiator:: |
public | function |
Determine the active theme for the request. Overrides ThemeNegotiatorInterface:: |