public function Url::mergeOptions in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Url.php \Drupal\Core\Url::mergeOptions()
- 9 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;
}