You are here

public function PageDisplayVariantSelectionEvent::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php \Drupal\Core\Render\PageDisplayVariantSelectionEvent::__construct()

Constructs the page display variant plugin selection event.

Parameters

string: 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 67
Contains \Drupal\Core\Render\PageDisplayVariantSelectionEvent.

Class

PageDisplayVariantSelectionEvent
Event fired when rendering main content, to select a page display variant.

Namespace

Drupal\Core\Render

Code

public function __construct($plugin_id, RouteMatchInterface $route_match) {
  $this->pluginId = $plugin_id;
  $this->routeMatch = $route_match;
}