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

Breadcrumb

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

function Url::setOption

Sets a specific option.

See \Drupal\Core\Url::fromUri() for details on the options.

Parameters

string $name: The name of the option.

mixed $value: The option value.

Return value

$this

File

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

Class

Url
Defines an object that holds information about a URL.

Namespace

Drupal\Core

Code

public function setOption($name, $value) {
    $this->options[$name] = $value;
    return $this;
}
RSS feed
Powered by Drupal