Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 6 |
| DefaultNegotiator | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 6 |
| __construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| applies | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| determineActiveTheme | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\Core\Theme\DefaultNegotiator. | |
| */ | |
| namespace Drupal\Core\Theme; | |
| use Drupal\Core\Config\ConfigFactoryInterface; | |
| use Drupal\Core\Routing\RouteMatchInterface; | |
| /** | |
| * Determines the default theme of the site. | |
| */ | |
| class DefaultNegotiator implements ThemeNegotiatorInterface { | |
| /** | |
| * The system theme config object. | |
| * | |
| * @var \Drupal\Core\Config\ConfigFactoryInterface | |
| */ | |
| protected $configFactory; | |
| /** | |
| * Constructs a DefaultNegotiator object. | |
| * | |
| * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory | |
| * The config factory. | |
| */ | |
| public function __construct(ConfigFactoryInterface $config_factory) { | |
| $this->configFactory = $config_factory; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function applies(RouteMatchInterface $route_match) { | |
| return TRUE; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function determineActiveTheme(RouteMatchInterface $route_match) { | |
| return $this->configFactory->get('system.theme')->get('default'); | |
| } | |
| } |