public PagersCacheContext::getContext($pager_id = NULL)
Overrides CalculatedCacheContextInterface::getContext
See also
File
- core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php, line 28
Class
- PagersCacheContext
- Defines a cache context for "per page in a pager" caching.
Namespace
Drupal\Core\Cache\Context
Code
1 2 3 4 5 6 7 8 9 | public function getContext( $pager_id = NULL) { // The value of the 'page' query argument contains the information that // controls *all* pagers. if ( $pager_id === NULL) { return $this ->requestStack->getCurrentRequest()->query->get( 'page' , '' ); } return $pager_id . '.' . pager_find_page( $pager_id ); } |
Please login to continue.