public function CacheTestController::urlBubbling in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/cache_test/src/Controller/CacheTestController.php \Drupal\cache_test\Controller\CacheTestController::urlBubbling()
Early renders a URL to test bubbleable metadata bubbling.
1 string reference to 'CacheTestController::urlBubbling'
- cache_test.routing.yml in core/
modules/ system/ tests/ modules/ cache_test/ cache_test.routing.yml - core/modules/system/tests/modules/cache_test/cache_test.routing.yml
File
- core/
modules/ system/ tests/ modules/ cache_test/ src/ Controller/ CacheTestController.php, line 15
Class
- CacheTestController
- Controller routines for cache_test routes.
Namespace
Drupal\cache_test\ControllerCode
public function urlBubbling() {
$url = Url::fromRoute('<current>')
->setAbsolute();
return [
'#markup' => 'This URL is early-rendered: ' . $url
->toString() . '. Yet, its bubbleable metadata should be bubbled.',
];
}