function Url::mergeOptions
Same name in other branches
- 9 core/lib/Drupal/Core/Url.php \Drupal\Core\Url::mergeOptions()
- 8.9.x core/lib/Drupal/Core/Url.php \Drupal\Core\Url::mergeOptions()
- 11.x core/lib/Drupal/Core/Url.php \Drupal\Core\Url::mergeOptions()
Merges the URL options with any currently set.
In the case of conflict with existing options, the new options will replace the existing options.
Parameters
array $options: The array of options. See \Drupal\Core\Url::fromUri() for details on what it contains.
Return value
$this
File
-
core/
lib/ Drupal/ Core/ Url.php, line 702
Class
- Url
- Defines an object that holds information about a URL.
Namespace
Drupal\CoreCode
public function mergeOptions($options) {
$this->options = NestedArray::mergeDeep($this->options, $options);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.