UrlGeneratorTrait::url

protected UrlGeneratorTrait::url($route_name, $route_parameters = array(), $options = array()) Generates a URL or path for a specific route based on the given parameters. For details on the arguments, usage, and possible exceptions see \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute(). Return value string The generated URL for the given route. Deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Url instead. See also \Drupal\Core\Routing\UrlGen

UrlGeneratorInterface::generateFromRoute

public UrlGeneratorInterface::generateFromRoute($name, $parameters = array(), $options = array(), $collect_bubbleable_metadata = FALSE) Generates a URL or path for a specific route based on the given parameters. Parameters that reference placeholders in the route pattern will be substituted for them in the pattern. Extra params are added as query strings to the URL. @internal Should not be used in user code. Use \Drupal\Core\Url instead. Parameters string|\Symfony\Component\Routing\Route $name

UrlGeneratorTrait::$urlGenerator

The url generator. Type: \Drupal\Core\Routing\UrlGeneratorInterface File core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php, line 25 Class UrlGeneratorTrait Wrapper methods for the Url Generator. Namespace Drupal\Core\Routing Code protected $urlGenerator;

UrlGeneratorInterface::getPathFromRoute

public UrlGeneratorInterface::getPathFromRoute($name, $parameters = array()) Gets the internal path (system path) for a route. Parameters string|\Symfony\Component\Routing\Route $name: The route name or a route object. array $parameters: An array of parameters as passed to \Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate(). Return value string The internal Drupal path corresponding to the route. File core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php, line 26 Class

UrlGeneratorInterface

Defines an interface for generating a url from a route or system path. Provides additional methods and options not present in the base interface. Hierarchy interface \Symfony\Cmf\Component\Routing\VersatileGeneratorInterface extends \Symfony\Cmf\Component\Routing\UrlGeneratorInterface interface \Drupal\Core\Routing\UrlGeneratorInterface File core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php, line 12 Namespace Drupal\Core\Routing Members Name Modifiers Type Description Ur

UrlGeneratorTrait

Wrapper methods for the Url Generator. This utility trait should only be used in application-level code, such as classes that would implement ContainerInjectionInterface. Services registered in the Container should not use this trait but inject the appropriate service directly for easier testing. Hierarchy trait \Drupal\Core\Routing\UrlGeneratorTrait Deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Url instead. File core/lib/Drupal/Core/Routing/UrlGener

UrlGenerator::supports

public UrlGenerator::supports($name) Whether this generator supports the supplied $name. This check does not need to look if the specific instance can be resolved to a route, only whether the router can generate routes from objects of this class. Parameters mixed $name The route "name" which may also be an object or anything: Return value bool Overrides VersatileGeneratorInterface::supports File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 434 Class UrlGenerator Generates URLs fro

UrlGenerator::setStrictRequirements

public UrlGenerator::setStrictRequirements($enabled) File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 106 Class UrlGenerator Generates URLs from route names and parameters. Namespace Drupal\Core\Routing Code public function setStrictRequirements($enabled) { // Ignore changes to this. }

UrlGenerator::setContext

public UrlGenerator::setContext(SymfonyRequestContext $context) File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 92 Class UrlGenerator Generates URLs from route names and parameters. Namespace Drupal\Core\Routing Code public function setContext(SymfonyRequestContext $context) { $this->context = $context; }

UrlGenerator::processRoute

protected UrlGenerator::processRoute($name, SymfonyRoute $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL) Passes the route to the processor manager for altering before compilation. Parameters string $name: The route name. \Symfony\Component\Routing\Route $route: The route object to process. array $parameters: An array of parameters to be passed to the route compiler. \Drupal\Core\Render\BubbleableMetadata $bubbleable_metadata: (optional) Object to collect route p