public function DynamicPageCacheTestController::html in Drupal 8
Same name and namespace in other branches
- 9 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 47
Class
- DynamicPageCacheTestController
- Controller routines for dynamic_page_cache_test routes.
Namespace
Drupal\dynamic_page_cache_testCode
public function html() {
return [
'content' => [
'#markup' => 'Hello world.',
],
];
}