public function PageDisplayVariantSelectionEvent::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php \Drupal\Core\Render\PageDisplayVariantSelectionEvent::__construct()
Constructs the page display variant plugin selection event.
Parameters
string $plugin_id: The ID of the page display variant plugin to use by default.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match, for context.
File
- core/
lib/ Drupal/ Core/ Render/ PageDisplayVariantSelectionEvent.php, line 62
Class
- PageDisplayVariantSelectionEvent
- Event fired when rendering main content, to select a page display variant.
Namespace
Drupal\Core\RenderCode
public function __construct($plugin_id, RouteMatchInterface $route_match) {
$this->pluginId = $plugin_id;
$this->routeMatch = $route_match;
}