function book_test_page_attachments
Implements hook_page_attachments().
File
- 
              core/modules/ book/ tests/ modules/ book_test/ book_test.module, line 17 
Code
function book_test_page_attachments(array &$page) {
  $page['#cache']['tags'][] = 'book_test.debug_book_navigation_cache_context';
  if (\Drupal::state()->get('book_test.debug_book_navigation_cache_context', FALSE)) {
    \Drupal::messenger()->addStatus(\Drupal::service('cache_contexts_manager')->convertTokensToKeys([
      'route.book_navigation',
    ])
      ->getKeys()[0]);
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
