public static function BubblingTest::bubblingCacheOverwritePrerender in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php \Drupal\Tests\Core\Render\BubblingTest::bubblingCacheOverwritePrerender()
#pre_render callback for testOverWriteCacheKeys().
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererBubblingTest.php, line 664 - Contains \Drupal\Tests\Core\Render\RendererBubblingTest.
Class
Namespace
Drupal\Tests\Core\RenderCode
public static function bubblingCacheOverwritePrerender($elements) {
// Overwrite the #cache entry with new data.
$elements['#cache'] = [
'keys' => [
'llama',
'foo',
],
];
$elements['#markup'] = 'Setting cache keys just now!';
return $elements;
}