3 namespace Drupal\Core\Theme;
5 use Drupal\Core\Config\ConfigFactoryInterface;
6 use Drupal\Core\Routing\RouteMatchInterface;
9 * Determines the default theme of the site.
11 class DefaultNegotiator implements ThemeNegotiatorInterface {
14 * The system theme config object.
16 * @var \Drupal\Core\Config\ConfigFactoryInterface
18 protected $configFactory;
21 * Constructs a DefaultNegotiator object.
23 * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
26 public function __construct(ConfigFactoryInterface $config_factory) {
27 $this->configFactory = $config_factory;
33 public function applies(RouteMatchInterface $route_match) {
40 public function determineActiveTheme(RouteMatchInterface $route_match) {
41 return $this->configFactory->get('system.theme')->get('default');