function ThemeAccessCheck::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Theme/ThemeAccessCheck.php \Drupal\Core\Theme\ThemeAccessCheck::__construct()
- 10 core/lib/Drupal/Core/Theme/ThemeAccessCheck.php \Drupal\Core\Theme\ThemeAccessCheck::__construct()
- 9 core/lib/Drupal/Core/Theme/ThemeAccessCheck.php \Drupal\Core\Theme\ThemeAccessCheck::__construct()
- 8.9.x core/lib/Drupal/Core/Theme/ThemeAccessCheck.php \Drupal\Core\Theme\ThemeAccessCheck::__construct()
Constructs a \Drupal\Core\Theme\Registry object.
Parameters
array $themes: Theme information from the container parameter.
File
-
core/
lib/ Drupal/ Core/ Theme/ ThemeAccessCheck.php, line 19
Class
- ThemeAccessCheck
- Provides access checking for themes for routing and theme negotiation.
Namespace
Drupal\Core\ThemeCode
public function __construct(protected $themes) {
if (!is_array($themes)) {
@trigger_error('Passing ThemeHandlerInterface to ' . __METHOD__ . ' is deprecated in drupal::11.4.0 and is removed from drupal:12.0.0. Pass theme info from the "container.themes" container parameter instead. See https://www.drupal.org/project/drupal/issues/2538970');
$this->themes = \Drupal::getContainer()->getParameter('container.themes');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.