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

Breadcrumb

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

function AttributeClassLoader::getDefaultRouteName

Gets the default route name for a class method.

Return value

string

1 call to AttributeClassLoader::getDefaultRouteName()
AttributeClassLoader::addRoute in vendor/symfony/routing/Loader/AttributeClassLoader.php

File

vendor/symfony/routing/Loader/AttributeClassLoader.php, line 255

Class

AttributeClassLoader
AttributeClassLoader loads routing information from a PHP class and its methods.

Namespace

Symfony\Component\Routing\Loader

Code

protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) {
    $name = str_replace('\\', '_', $class->name) . '_' . $method->name;
    $name = \function_exists('mb_strtolower') && preg_match('//u', $name) ? mb_strtolower($name, 'UTF-8') : strtolower($name);
    if ($this->defaultRouteIndex > 0) {
        $name .= '_' . $this->defaultRouteIndex;
    }
    ++$this->defaultRouteIndex;
    return $name;
}

API Navigation

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