You are here

public function ResourceDecoratorBase::getUrl in RESTful 7.2

Helper method; Get the URL of the resource and query strings.

By default the URL is absolute.

Parameters

array $options: Array with options passed to url().

bool $keep_query: If TRUE the $request will be appended to the $options['query']. This is the typical behavior for $_GET method, however it is not for $_POST. Defaults to TRUE.

RequestInterface $request: The request object.

Return value

string The URL address.

Overrides ResourceInterface::getUrl

File

src/Plugin/resource/Decorators/ResourceDecoratorBase.php, line 326
Contains \Drupal\restful\Plugin\resource\Decorators\ResourceDecoratorBase.

Class

ResourceDecoratorBase
Class ResourceDecoratorBase.

Namespace

Drupal\restful\Plugin\resource\Decorators

Code

public function getUrl(array $options = array(), $keep_query = TRUE, RequestInterface $request = NULL) {
  return $this->subject
    ->getUrl($options, $keep_query, $request);
}