Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CompiledUrlGeneratorDumper.php

function CompiledUrlGeneratorDumper::generateDeclaredRoutes

Generates PHP code representing an array of defined routes together with the routes properties (e.g. requirements).

File

vendor/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php, line 108

Class

CompiledUrlGeneratorDumper
CompiledUrlGeneratorDumper creates a PHP array to be used with CompiledUrlGenerator.

Namespace

Symfony\Component\Routing\Generator\Dumper

Code

private function generateDeclaredRoutes() : string {
    $routes = '';
    foreach ($this->getCompiledRoutes() as $name => $properties) {
        $routes .= \sprintf("\n    '%s' => %s,", $name, CompiledUrlMatcherDumper::export($properties));
    }
    foreach ($this->getCompiledAliases() as $alias => $properties) {
        $routes .= \sprintf("\n    '%s' => %s,", $alias, CompiledUrlMatcherDumper::export($properties));
    }
    return $routes;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal