public function ContentHubPageDisplayVariantSubscriber::onSelectPageDisplayVariant in Acquia Content Hub 8
Selects the block page display variant.
Parameters
\Drupal\Core\Render\PageDisplayVariantSelectionEvent $event: The event to process.
File
- src/
EventSubscriber/ ContentHubPageDisplayVariantSubscriber.php, line 40
Class
- ContentHubPageDisplayVariantSubscriber
- Selects the simple page display variant.
Namespace
Drupal\acquia_contenthub\EventSubscriberCode
public function onSelectPageDisplayVariant(PageDisplayVariantSelectionEvent $event) {
if ($this->routeMatch
->getRouteName() === 'acquia_contenthub.content_entity_display.entity') {
$event
->setPluginId('contenthub_page');
}
}