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

Breadcrumb

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

function Url::setAbsolute

Sets the value of the absolute option for this Url.

Parameters

bool $absolute: (optional) Whether to make this URL absolute or not. Defaults to TRUE.

Return value

$this

File

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

Class

Url
Defines an object that holds information about a URL.

Namespace

Drupal\Core

Code

public function setAbsolute($absolute = TRUE) {
    $this->options['absolute'] = $absolute;
    return $this;
}
RSS feed
Powered by Drupal