DefaultNegotiator.php in Drupal 9
File
core/lib/Drupal/Core/Theme/DefaultNegotiator.php
View source
<?php
namespace Drupal\Core\Theme;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Routing\RouteMatchInterface;
class DefaultNegotiator implements ThemeNegotiatorInterface {
protected $configFactory;
public function __construct(ConfigFactoryInterface $config_factory) {
$this->configFactory = $config_factory;
}
public function applies(RouteMatchInterface $route_match) {
return TRUE;
}
public function determineActiveTheme(RouteMatchInterface $route_match) {
return $this->configFactory
->get('system.theme')
->get('default');
}
}