GlazedSettingsThemeNegotiator.php in DXPR Theme Helper 8
File
src/Theme/GlazedSettingsThemeNegotiator.php
View source
<?php
namespace Drupal\glazed_helper\Theme;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Theme\ThemeNegotiatorInterface;
class GlazedSettingsThemeNegotiator implements ThemeNegotiatorInterface {
public function applies(RouteMatchInterface $route_match) {
$route = $route_match
->getRouteObject();
return $route && $route
->getPath() == '/admin/appearance/settings/{theme}';
}
public function determineActiveTheme(RouteMatchInterface $route_match) {
$current_theme = $route_match
->getParameter('theme');
return $current_theme;
}
}