You are here

class GlazedSettingsThemeNegotiator in DXPR Theme Helper 8

Forces theme settings forms to use the Theme that is being configured

Hierarchy

Expanded class hierarchy of GlazedSettingsThemeNegotiator

1 string reference to 'GlazedSettingsThemeNegotiator'
glazed_helper.services.yml in ./glazed_helper.services.yml
glazed_helper.services.yml
1 service uses GlazedSettingsThemeNegotiator
theme.negotiator.glazed_settings in ./glazed_helper.services.yml
Drupal\glazed_helper\Theme\GlazedSettingsThemeNegotiator

File

src/Theme/GlazedSettingsThemeNegotiator.php, line 11

Namespace

Drupal\glazed_helper\Theme
View 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

Namesort descending Modifiers Type Description Overrides
GlazedSettingsThemeNegotiator::applies public function Whether this theme negotiator should be used to set the theme. Overrides ThemeNegotiatorInterface::applies
GlazedSettingsThemeNegotiator::determineActiveTheme public function Determine the active theme for the request. Overrides ThemeNegotiatorInterface::determineActiveTheme