PageDisplayVariantSelectionEvent

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

Subscribers of this event can call the following setters to pass additional information along to the selected variant:

  • self::setPluginConfiguration()
  • self::setContexts()
  • self::addCacheableDependency()

Hierarchy

See also

\Drupal\Core\Render\RenderEvents::SELECT_PAGE_DISPLAY_VARIANT

\Drupal\Core\Render\MainContent\HtmlRenderer

File

core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php, line 22

Namespace

Drupal\Core\Render

Members

Name Modifiers Type Description
Event::$dispatcher private property
Event::$name private property
Event::$propagationStopped private property
Event::getDispatcher Deprecated public function Returns the EventDispatcher that dispatches this Event.
Event::getName Deprecated public function Gets the event's name.
Event::isPropagationStopped public function Returns whether further event listeners should be triggered.
Event::setDispatcher Deprecated public function Stores the EventDispatcher that dispatches this Event.
Event::setName Deprecated public function Sets the event's name property.
Event::stopPropagation public function Stops the propagation of the event to further event listeners.
PageDisplayVariantSelectionEvent::$contexts protected property An array of collected contexts to pass to the page display variant.
PageDisplayVariantSelectionEvent::$pluginConfiguration protected property The configuration for the selected page display variant.
PageDisplayVariantSelectionEvent::$pluginId protected property The selected page display variant plugin ID.
PageDisplayVariantSelectionEvent::$routeMatch protected property The current route match.
PageDisplayVariantSelectionEvent::getContexts public function Gets the contexts that were set during event dispatch.
PageDisplayVariantSelectionEvent::getPluginConfiguration public function Get the configuration for the selected page display variant.
PageDisplayVariantSelectionEvent::getPluginId public function The selected page display variant plugin ID.
PageDisplayVariantSelectionEvent::getRouteMatch public function Gets the current route match.
PageDisplayVariantSelectionEvent::setContexts public function Sets the contexts to be passed to the page display variant.
PageDisplayVariantSelectionEvent::setPluginConfiguration public function Set the configuration for the selected page display variant.
PageDisplayVariantSelectionEvent::setPluginId public function The selected page display variant plugin ID.
PageDisplayVariantSelectionEvent::__construct public function Constructs the page display variant plugin selection event.
RefinableCacheableDependencyTrait::$cacheContexts protected property Cache contexts.
RefinableCacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
RefinableCacheableDependencyTrait::$cacheTags protected property Cache tags.
RefinableCacheableDependencyTrait::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. Overrides RefinableCacheableDependencyInterface::addCacheableDependency
RefinableCacheableDependencyTrait::addCacheContexts public function Adds cache contexts. Overrides RefinableCacheableDependencyInterface::addCacheContexts
RefinableCacheableDependencyTrait::addCacheTags public function Adds cache tags. Overrides RefinableCacheableDependencyInterface::addCacheTags
RefinableCacheableDependencyTrait::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts
RefinableCacheableDependencyTrait::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge
RefinableCacheableDependencyTrait::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. Overrides RefinableCacheableDependencyInterface::mergeCacheMaxAge
doc_Drupal
2016-10-29 09:32:55
Comments
Leave a Comment

Please login to continue.