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