Url::setUrlGenerator

public Url::setUrlGenerator(UrlGeneratorInterface $url_generator = NULL)

Sets the URL generator.

Parameters

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: (optional) The URL generator, specify NULL to reset it.

Return value

$this

File

core/lib/Drupal/Core/Url.php, line 853

Class

Url
Defines an object that holds information about a URL.

Namespace

Drupal\Core

Code

public function setUrlGenerator(UrlGeneratorInterface $url_generator = NULL) {
  $this->urlGenerator = $url_generator;
  $this->internalPath = NULL;
  return $this;
}
doc_Drupal
2016-10-29 09:51:43
Comments
Leave a Comment

Please login to continue.