public function AuthcacheP13nTestRequestUrlGeneratorStub::url in Authenticated User Page Caching (Authcache) 7.2
Generate an url for the given request and parameter.
@returns array An associative array consisting of the following key-value pairs:
- path: A relative or absolute URL without query or fragment suitable for supplying to the $path parameter of the drupal url() function.
- options: An associative array containing the options as accepted by the $options parameter of the drupal url() function.
Overrides AuthcacheP13nRequestUrlGeneratorInterface::url
See also
url()
File
- modules/
authcache_p13n/ tests/ authcache_p13n.stub.inc, line 638 - Stub classes for testing.
Class
- AuthcacheP13nTestRequestUrlGeneratorStub
- Stub URL generator.
Code
public function url($route_id, $arg = NULL) {
if ($route_id === 'test/bad') {
return FALSE;
}
else {
return array(
'path' => 'http://example.com/authcache.php',
'options' => array(
'query' => array(
'r' => $route_id,
'a' => $arg ?: '',
),
),
);
}
}