function DynamicPageCacheTestController::html
Same name in other branches
- 9 core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php \Drupal\dynamic_page_cache_test\DynamicPageCacheTestController::html()
- 8.9.x core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php \Drupal\dynamic_page_cache_test\DynamicPageCacheTestController::html()
- 10 core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php \Drupal\dynamic_page_cache_test\DynamicPageCacheTestController::html()
A route returning a render array (without cache contexts, so cacheable).
Return value
array A render array.
4 calls to DynamicPageCacheTestController::html()
- DynamicPageCacheTestController::htmlUncacheableContexts in core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ src/ DynamicPageCacheTestController.php - A route returning a render array (with 'user' context, so uncacheable)
- DynamicPageCacheTestController::htmlUncacheableMaxAge in core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ src/ DynamicPageCacheTestController.php - A route returning a render array (with max-age=0, so uncacheable)
- DynamicPageCacheTestController::htmlUncacheableTags in core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ src/ DynamicPageCacheTestController.php - A route returning a render array (with a cache tag preventing caching).
- DynamicPageCacheTestController::htmlWithCacheContexts in core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ src/ DynamicPageCacheTestController.php - A route returning a render array (with cache contexts, so cacheable).
1 string reference to 'DynamicPageCacheTestController::html'
- dynamic_page_cache_test.routing.yml in core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ dynamic_page_cache_test.routing.yml - core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/dynamic_page_cache_test.routing.yml
File
-
core/
modules/ dynamic_page_cache/ tests/ dynamic_page_cache_test/ src/ DynamicPageCacheTestController.php, line 51
Class
- DynamicPageCacheTestController
- Controller routines for dynamic_page_cache_test routes.
Namespace
Drupal\dynamic_page_cache_testCode
public function html() {
return [
'content' => [
'#markup' => 'Hello world.',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.