public function WebformThemeNegotiator::__construct in Webform 8.5
Same name and namespace in other branches
- 6.x src/Theme/WebformThemeNegotiator.php \Drupal\webform\Theme\WebformThemeNegotiator::__construct()
Creates a new WebformThemeNegotiator instance.
Parameters
\Drupal\Core\Session\AccountInterface $user: The current user.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\webform\WebformRequestInterface $request_handler: The webform request handler.
File
- src/
Theme/ WebformThemeNegotiator.php, line 47
Class
- WebformThemeNegotiator
- Sets the admin theme on a webform that does not have a public canonical URL.
Namespace
Drupal\webform\ThemeCode
public function __construct(AccountInterface $user, ConfigFactoryInterface $config_factory, WebformRequestInterface $request_handler = NULL) {
$this->user = $user;
$this->configFactory = $config_factory;
// @todo Webform 8.x-6.x: Require request handler.
$this->requestHandler = $request_handler ?: \Drupal::service('webform.request');
}