public function MainContentViewSubscriber::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php \Drupal\Core\EventSubscriber\MainContentViewSubscriber::__construct()
Constructs a new MainContentViewSubscriber object.
Parameters
\Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver: The class resolver service.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
array $main_content_renderers: The available main content renderer service IDs, keyed by format.
File
- core/
lib/ Drupal/ Core/ EventSubscriber/ MainContentViewSubscriber.php, line 71 - Contains \Drupal\Core\EventSubscriber\MainContentViewSubscriber.
Class
- MainContentViewSubscriber
- View subscriber rendering main content render arrays into responses.
Namespace
Drupal\Core\EventSubscriberCode
public function __construct(ClassResolverInterface $class_resolver, RouteMatchInterface $route_match, array $main_content_renderers) {
$this->classResolver = $class_resolver;
$this->routeMatch = $route_match;
$this->mainContentRenderers = $main_content_renderers;
}