class RouteSubscriber in Module Builder 8.3
Alters the code analysis route to use our form class.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\module_builder_devel\Routing\RouteSubscriber
Expanded class hierarchy of RouteSubscriber
1 string reference to 'RouteSubscriber'
- module_builder_devel.services.yml in module_builder_devel/
module_builder_devel.services.yml - module_builder_devel/module_builder_devel.services.yml
1 service uses RouteSubscriber
File
- module_builder_devel/
src/ Routing/ RouteSubscriber.php, line 11
Namespace
Drupal\module_builder_devel\RoutingView source
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
// Change form class for the process form.
if ($route = $collection
->get('module_builder.analyse')) {
$route
->setDefault('_form', \Drupal\module_builder_devel\Form\ProcessFormExtra::class);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteSubscriber:: |
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 |