class RouteSubscriber in Varbase Core 8.6
Same name and namespace in other branches
- 8.8 modules/varbase_update_helper/src/Routing/RouteSubscriber.php \Drupal\varbase_update_helper\Routing\RouteSubscriber
- 8.7 modules/varbase_update_helper/src/Routing/RouteSubscriber.php \Drupal\varbase_update_helper\Routing\RouteSubscriber
- 9.0.x modules/varbase_update_helper/src/Routing/RouteSubscriber.php \Drupal\varbase_update_helper\Routing\RouteSubscriber
Listens to the dynamic route events.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\varbase_update_helper\Routing\RouteSubscriber
Expanded class hierarchy of RouteSubscriber
1 string reference to 'RouteSubscriber'
- varbase_update_helper.services.yml in modules/
varbase_update_helper/ varbase_update_helper.services.yml - modules/varbase_update_helper/varbase_update_helper.services.yml
1 service uses RouteSubscriber
- varbase_update_helper.route_subscriber in modules/
varbase_update_helper/ varbase_update_helper.services.yml - Drupal\varbase_update_helper\Routing\RouteSubscriber
File
- modules/
varbase_update_helper/ src/ Routing/ RouteSubscriber.php, line 11
Namespace
Drupal\varbase_update_helper\RoutingView source
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
public function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('checklistapi.checklists.update_helper_checklist')) {
$route
->setDefault('_title', 'Varbase update instructions');
}
// Always deny access to '/admin/config/development/update-helper/clear'.
if ($route = $collection
->get('checklistapi.checklists.update_helper_checklist.clear')) {
$route
->setRequirement('_access', 'FALSE');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteSubscriber:: |
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 |