Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / modules / lazy_route_provider_install_test / lazy_route_provider_install_test.module
1 <?php
2
3 /**
4  * @file
5  * Helper module for the lazy route provider tests.
6  */
7
8 /**
9  * Implements hook_menu_links_discovered_alter().
10  */
11 function lazy_route_provider_install_test_menu_links_discovered_alter(&$links) {
12   $message = \Drupal::state()->get(__FUNCTION__, 'success');
13   try {
14     // Ensure that calling this does not cause a recursive rebuild.
15     \Drupal::service('router.route_provider')->getAllRoutes();
16   }
17   catch (\RuntimeException $e) {
18     $message = 'failed';
19   }
20   \Drupal::state()->set(__FUNCTION__, $message);
21 }