function BlockPageDisplayVariantSubscriber::onSelectPageDisplayVariant

Same name in other branches
  1. 9 core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php \Drupal\block\EventSubscriber\BlockPageDisplayVariantSubscriber::onSelectPageDisplayVariant()
  2. 10 core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php \Drupal\block\EventSubscriber\BlockPageDisplayVariantSubscriber::onSelectPageDisplayVariant()
  3. 11.x core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php \Drupal\block\EventSubscriber\BlockPageDisplayVariantSubscriber::onSelectPageDisplayVariant()

Selects the block page display variant.

Parameters

\Drupal\Core\Render\PageDisplayVariantSelectionEvent $event: The event to process.

File

core/modules/block/src/EventSubscriber/BlockPageDisplayVariantSubscriber.php, line 22

Class

BlockPageDisplayVariantSubscriber
Selects the block page display variant.

Namespace

Drupal\block\EventSubscriber

Code

public function onSelectPageDisplayVariant(PageDisplayVariantSelectionEvent $event) {
    $event->setPluginId('block_page');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.