UrlGenerator::generateFromRoute

public UrlGenerator::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: The rou

UrlGenerator::$routeProcessor

The route processor. Type: \Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 46 Class UrlGenerator Generates URLs from route names and parameters. Namespace Drupal\Core\Routing Code protected $routeProcessor;

UrlGenerator::$pathProcessor

The path processor to convert the system path to one suitable for urls. Type: \Drupal\Core\PathProcessor\OutboundPathProcessorInterface File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 39 Class UrlGenerator Generates URLs from route names and parameters. Namespace Drupal\Core\Routing Code protected $pathProcessor;

UrlGenerator::$decodedChars

Overrides characters that will not be percent-encoded in the path segment. The first two elements are the first two parameters of str_replace(), so if you override this variable you can also use arrays for the encoded and decoded characters. See also \Symfony\Component\Routing\Generator\UrlGenerator File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 57 Class UrlGenerator Generates URLs from route names and parameters. Namespace Drupal\Core\Routing Code protected $decodedChars =

UrlGenerator::$requestStack

A request stack object. Type: \Symfony\Component\HttpFoundation\RequestStack File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 32 Class UrlGenerator Generates URLs from route names and parameters. Namespace Drupal\Core\Routing Code protected $requestStack;

UrlGenerator::$context

Type: RequestContext File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 25 Class UrlGenerator Generates URLs from route names and parameters. Namespace Drupal\Core\Routing Code protected $context;

Url::__construct

public Url::__construct($route_name, $route_parameters = array(), $options = array()) Constructs a new Url object. In most cases, use Url::fromRoute() or Url::fromUri() rather than constructing Url objects directly in order to avoid ambiguity and make your code more self-documenting. @todo Update this documentation for non-routed URIs in https://www.drupal.org/node/2346787 Parameters string $route_name: The name of the route array $route_parameters: (optional) An associative array of parameter

Url::validateUrl

public static Url::validateUrl(&$element, FormStateInterface $form_state, &$complete_form) Form element validation handler for #type 'url'. Note that #maxlength and #required is validated by _form_validate() already. File core/lib/Drupal/Core/Render/Element/Url.php, line 62 Class Url Provides a form element for input of a URL. Namespace Drupal\Core\Render\Element Code public static function validateUrl(&$element, FormStateInterface $form_state, &$complete_form) { $val

UrlGenerator

Generates URLs from route names and parameters. Hierarchy class \Drupal\Core\Routing\UrlGenerator implements UrlGeneratorInterface File core/lib/Drupal/Core/Routing/UrlGenerator.php, line 20 Namespace Drupal\Core\Routing Members Name Modifiers Type Description UrlGenerator::$context protected property UrlGenerator::$decodedChars protected property Overrides characters that will not be percent-encoded in the path segment. UrlGenerator::$pathProcessor protected

Url::urlGenerator

protected Url::urlGenerator() Gets the URL generator. Return value \Drupal\Core\Routing\UrlGeneratorInterface The URL generator. File core/lib/Drupal/Core/Url.php, line 825 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code protected function urlGenerator() { if (!$this->urlGenerator) { $this->urlGenerator = \Drupal::urlGenerator(); } return $this->urlGenerator; }