Chris@0: pluginId = $plugin_id; Chris@0: $this->routeMatch = $route_match; Chris@0: } Chris@0: Chris@0: /** Chris@0: * The selected page display variant plugin ID. Chris@0: * Chris@0: * @param string $plugin_id Chris@0: * The ID of the page display variant plugin to use. Chris@0: * Chris@0: * @return $this Chris@0: */ Chris@0: public function setPluginId($plugin_id) { Chris@0: $this->pluginId = $plugin_id; Chris@0: return $this; Chris@0: } Chris@0: Chris@0: /** Chris@0: * The selected page display variant plugin ID. Chris@0: * Chris@0: * @return string Chris@0: */ Chris@0: public function getPluginId() { Chris@0: return $this->pluginId; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Set the configuration for the selected page display variant. Chris@0: * Chris@0: * @param array $configuration Chris@0: * The configuration for the selected page display variant. Chris@0: * Chris@0: * @return $this Chris@0: */ Chris@0: public function setPluginConfiguration(array $configuration) { Chris@0: $this->pluginConfiguration = $configuration; Chris@0: return $this; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Get the configuration for the selected page display variant. Chris@0: * Chris@0: * @return array Chris@0: */ Chris@0: public function getPluginConfiguration() { Chris@0: return $this->pluginConfiguration; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Gets the current route match. Chris@0: * Chris@0: * @return \Drupal\Core\Routing\RouteMatchInterface Chris@0: * The current route match, for context. Chris@0: */ Chris@0: public function getRouteMatch() { Chris@0: return $this->routeMatch; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Gets the contexts that were set during event dispatch. Chris@0: * Chris@0: * @return \Drupal\Component\Plugin\Context\ContextInterface[] Chris@0: * An array of set contexts, keyed by context name. Chris@0: */ Chris@0: public function getContexts() { Chris@0: return $this->contexts; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Sets the contexts to be passed to the page display variant. Chris@0: * Chris@0: * @param \Drupal\Component\Plugin\Context\ContextInterface[] $contexts Chris@0: * An array of contexts, keyed by context name. Chris@0: * Chris@0: * @return $this Chris@0: */ Chris@0: public function setContexts(array $contexts) { Chris@0: $this->contexts = $contexts; Chris@0: return $this; Chris@0: } Chris@0: Chris@0: }