class ParagraphBlocksRouteSubscriber in Paragraph blocks 8
Same name and namespace in other branches
- 8.2 src/Routing/ParagraphBlocksRouteSubscriber.php \Drupal\paragraph_blocks\Routing\ParagraphBlocksRouteSubscriber
- 3.x src/Routing/ParagraphBlocksRouteSubscriber.php \Drupal\paragraph_blocks\Routing\ParagraphBlocksRouteSubscriber
Listen to route events to override panels.select_block controller.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\paragraph_blocks\Routing\ParagraphBlocksRouteSubscriber
Expanded class hierarchy of ParagraphBlocksRouteSubscriber
1 string reference to 'ParagraphBlocksRouteSubscriber'
1 service uses ParagraphBlocksRouteSubscriber
File
- src/
Routing/ ParagraphBlocksRouteSubscriber.php, line 11
Namespace
Drupal\paragraph_blocks\RoutingView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParagraphBlocksRouteSubscriber:: |
public | 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 |