public function TestCacheBlock::getCacheContexts in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/block/tests/modules/block_test/src/Plugin/Block/TestCacheBlock.php \Drupal\block_test\Plugin\Block\TestCacheBlock::getCacheContexts()
Overrides ContextAwarePluginBase::getCacheContexts
File
- core/
modules/ block/ tests/ modules/ block_test/ src/ Plugin/ Block/ TestCacheBlock.php, line 38 - Contains \Drupal\block_test\Plugin\Block\TestCacheBlock.
Class
- TestCacheBlock
- Provides a block to test caching.
Namespace
Drupal\block_test\Plugin\BlockCode
public function getCacheContexts() {
return \Drupal::state()
->get('block_test.cache_contexts', []);
}