public function VoyagerPageDisplayVariantSubscriber::onSelectPageDisplayVariant in GraphQL 8.3
Disables any display variant on the voyager page.
Parameters
\Drupal\Core\Render\PageDisplayVariantSelectionEvent $event: The event to process.
File
- src/
EventSubscriber/ VoyagerPageDisplayVariantSubscriber.php, line 20
Class
- VoyagerPageDisplayVariantSubscriber
- Disables any display variant on the voyager page.
Namespace
Drupal\graphql\EventSubscriberCode
public function onSelectPageDisplayVariant(PageDisplayVariantSelectionEvent $event) {
if (strpos($event
->getRouteMatch()
->getRouteName(), 'graphql.voyager.') === 0) {
$event
->setPluginId(NULL)
->stopPropagation();
}
}