class GatsbyInstantPreviewRouteSubscriber in Gatsby Live Preview & Incremental Builds 8
Same name and namespace in other branches
- 2.0.x modules/gatsby_instantpreview/src/Routing/GatsbyInstantPreviewRouteSubscriber.php \Drupal\gatsby_instantpreview\Routing\GatsbyInstantPreviewRouteSubscriber
Listens to the dynamic route events.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\gatsby_instantpreview\Routing\GatsbyInstantPreviewRouteSubscriber
Expanded class hierarchy of GatsbyInstantPreviewRouteSubscriber
1 string reference to 'GatsbyInstantPreviewRouteSubscriber'
- gatsby_instantpreview.services.yml in modules/
gatsby_instantpreview/ gatsby_instantpreview.services.yml - modules/gatsby_instantpreview/gatsby_instantpreview.services.yml
1 service uses GatsbyInstantPreviewRouteSubscriber
File
- modules/
gatsby_instantpreview/ src/ Routing/ GatsbyInstantPreviewRouteSubscriber.php, line 11
Namespace
Drupal\gatsby_instantpreview\RoutingView source
class GatsbyInstantPreviewRouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('gatsby.gatsby_admin_form')) {
$route
->setDefault('_form', 'Drupal\\gatsby_instantpreview\\Form\\GatsbyInstantPreviewAdminForm');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GatsbyInstantPreviewRouteSubscriber:: |
protected | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |
|
RouteSubscriberBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | 5 |
RouteSubscriberBase:: |
public | function | Delegates the route altering to self::alterRoutes(). | 1 |