You are here

class GatsbyInstantPreviewRouteSubscriber in Gatsby Live Preview & Incremental Builds 8

Same name and namespace in other branches
  1. 2.0.x modules/gatsby_instantpreview/src/Routing/GatsbyInstantPreviewRouteSubscriber.php \Drupal\gatsby_instantpreview\Routing\GatsbyInstantPreviewRouteSubscriber

Listens to the dynamic route events.

Hierarchy

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
gatsby_instantpreview.route_subscriber in modules/gatsby_instantpreview/gatsby_instantpreview.services.yml
Drupal\gatsby_instantpreview\Routing\GatsbyInstantPreviewRouteSubscriber

File

modules/gatsby_instantpreview/src/Routing/GatsbyInstantPreviewRouteSubscriber.php, line 11

Namespace

Drupal\gatsby_instantpreview\Routing
View 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

Namesort descending Modifiers Type Description Overrides
GatsbyInstantPreviewRouteSubscriber::alterRoutes protected function Alters existing routes for a specific collection. Overrides RouteSubscriberBase::alterRoutes
RouteSubscriberBase::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. 5
RouteSubscriberBase::onAlterRoutes public function Delegates the route altering to self::alterRoutes(). 1