function TestCacheBlock::getCacheMaxAge
Same name in other branches
- 8.9.x core/modules/block/tests/modules/block_test/src/Plugin/Block/TestCacheBlock.php \Drupal\block_test\Plugin\Block\TestCacheBlock::getCacheMaxAge()
- 10 core/modules/block/tests/modules/block_test/src/Plugin/Block/TestCacheBlock.php \Drupal\block_test\Plugin\Block\TestCacheBlock::getCacheMaxAge()
- 11.x core/modules/block/tests/modules/block_test/src/Plugin/Block/TestCacheBlock.php \Drupal\block_test\Plugin\Block\TestCacheBlock::getCacheMaxAge()
Overrides ContextAwarePluginTrait::getCacheMaxAge
File
-
core/
modules/ block/ tests/ modules/ block_test/ src/ Plugin/ Block/ TestCacheBlock.php, line 40
Class
- TestCacheBlock
- Provides a block to test caching.
Namespace
Drupal\block_test\Plugin\BlockCode
public function getCacheMaxAge() {
return \Drupal::state()->get('block_test.cache_max_age', parent::getCacheMaxAge());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.