function ComponentNegotiator::__construct

Same name in this branch
  1. 11.x core/lib/Drupal/Core/Theme/ComponentNegotiator.php \Drupal\Core\Theme\ComponentNegotiator::__construct()
Same name in other branches
  1. 10 core/modules/sdc/src/ComponentNegotiator.php \Drupal\sdc\ComponentNegotiator::__construct()
  2. 10 core/lib/Drupal/Core/Theme/ComponentNegotiator.php \Drupal\Core\Theme\ComponentNegotiator::__construct()

Constructs ComponentNegotiator objects.

Parameters

\Drupal\Core\Theme\ThemeManagerInterface $themeManager: The theme manager.

\Drupal\Core\Extension\ModuleExtensionList $moduleExtensionList: The module extension list.

File

core/modules/sdc/src/ComponentNegotiator.php, line 39

Class

ComponentNegotiator
Determines which component should be used.

Namespace

Drupal\sdc

Code

public function __construct(ThemeManagerInterface $themeManager, ModuleExtensionList $moduleExtensionList) {
    $this->activeTheme = $this->themeManager
        ->getActiveTheme();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.