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 names and values.
array $options: See \Drupal\Core\Url::fromUri() for details.
See also
static::fromRoute()
static::fromUri()
File
- core/lib/Drupal/Core/Url.php, line 114
Class
- Url
- Defines an object that holds information about a URL.
Namespace
Drupal\Core
Code
public function __construct($route_name, $route_parameters = array(), $options = array()) { $this->routeName = $route_name; $this->routeParameters = $route_parameters; $this->options = $options; }
Please login to continue.