RouteSubscriber.php in Varbase Core 8.6
File
modules/varbase_update_helper/src/Routing/RouteSubscriber.php
View source
<?php
namespace Drupal\varbase_update_helper\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
class RouteSubscriber extends RouteSubscriberBase {
public function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('checklistapi.checklists.update_helper_checklist')) {
$route
->setDefault('_title', 'Varbase update instructions');
}
if ($route = $collection
->get('checklistapi.checklists.update_helper_checklist.clear')) {
$route
->setRequirement('_access', 'FALSE');
}
}
}