RouteSubscriber.php in Module Builder 8.3
Namespace
Drupal\module_builder_devel\RoutingFile
module_builder_devel/src/Routing/RouteSubscriber.phpView source
<?php
namespace Drupal\module_builder_devel\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
/**
* Alters the code analysis route to use our form class.
*/
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);
}
}
}
Classes
Name | Description |
---|---|
RouteSubscriber | Alters the code analysis route to use our form class. |