public static function PagerTestController::showPagerCacheContext in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php \Drupal\pager_test\Controller\PagerTestController::showPagerCacheContext()
#pre_render callback for #type => pager that shows the pager cache context.
File
- core/
modules/ system/ tests/ modules/ pager_test/ src/ Controller/ PagerTestController.php, line 71 - Contains \Drupal\pager_test\Controller\PagerTestController.
Class
- PagerTestController
- Controller routine for testing the pager.
Namespace
Drupal\pager_test\ControllerCode
public static function showPagerCacheContext(array $pager) {
drupal_set_message(\Drupal::service('cache_contexts_manager')
->convertTokensToKeys([
'url.query_args.pagers:' . $pager['#element'],
])
->getKeys()[0]);
return $pager;
}