You are here

protected function RulesUiRouteSubscriber::alterRoutes in Rules 8.3

Alters existing routes for a specific collection.

Parameters

\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.

Overrides RouteSubscriberBase::alterRoutes

File

src/Routing/RulesUiRouteSubscriber.php, line 37

Class

RulesUiRouteSubscriber
Adds routes generated by the rules UI handlers.

Namespace

Drupal\rules\Routing

Code

protected function alterRoutes(RouteCollection $collection) {
  foreach ($this->rulesUiManager
    ->getDefinitions() as $name => $definition) {
    $ui_definition = $this->rulesUiManager
      ->getDefinition($name);
    $this
      ->registerRoutes($ui_definition, $collection);
  }
}