You are here

class ParagraphBlocksRouteSubscriber in Paragraph blocks 8

Same name and namespace in other branches
  1. 8.2 src/Routing/ParagraphBlocksRouteSubscriber.php \Drupal\paragraph_blocks\Routing\ParagraphBlocksRouteSubscriber
  2. 3.x src/Routing/ParagraphBlocksRouteSubscriber.php \Drupal\paragraph_blocks\Routing\ParagraphBlocksRouteSubscriber

Listen to route events to override panels.select_block controller.

Hierarchy

Expanded class hierarchy of ParagraphBlocksRouteSubscriber

1 string reference to 'ParagraphBlocksRouteSubscriber'
paragraph_blocks.services.yml in ./paragraph_blocks.services.yml
paragraph_blocks.services.yml
1 service uses ParagraphBlocksRouteSubscriber
paragraph_blocks.route_subscriber in ./paragraph_blocks.services.yml
Drupal\paragraph_blocks\Routing\ParagraphBlocksRouteSubscriber

File

src/Routing/ParagraphBlocksRouteSubscriber.php, line 11

Namespace

Drupal\paragraph_blocks\Routing
View source
class ParagraphBlocksRouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  public function alterRoutes(RouteCollection $collection) {
    $route = $collection
      ->get('panels.select_block');
    if ($route) {
      $route
        ->setDefaults([
        '_controller' => '\\Drupal\\paragraph_blocks\\Controller\\ParagraphBlocksPanelsController::selectBlock',
      ]);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ParagraphBlocksRouteSubscriber::alterRoutes public 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