3 namespace Drupal\system\Theme;
5 use Drupal\Core\Config\ConfigFactoryInterface;
6 use Drupal\Core\Routing\RouteMatchInterface;
7 use Drupal\Core\Site\Settings;
8 use Drupal\Core\Theme\ThemeNegotiatorInterface;
11 * Sets the active theme for the database update pages.
13 class DbUpdateNegotiator implements ThemeNegotiatorInterface {
18 * @var \Drupal\Core\Config\ConfigFactoryInterface
20 protected $configFactory;
23 * Constructs a DbUpdateNegotiator.
25 * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
28 public function __construct(ConfigFactoryInterface $config_factory) {
29 $this->configFactory = $config_factory;
35 public function applies(RouteMatchInterface $route_match) {
36 return $route_match->getRouteName() == 'system.db_update';
42 public function determineActiveTheme(RouteMatchInterface $route_match) {
43 $custom_theme = Settings::get('maintenance_theme', 'seven');
45 $config = $this->configFactory->get('system.theme');
46 $custom_theme = $config->get('default');