lazy_route_provider_install_test.module
Same filename in other branches
- 9 core/modules/system/tests/modules/lazy_route_provider_install_test/lazy_route_provider_install_test.module
- 10 core/modules/system/tests/modules/lazy_route_provider_install_test/lazy_route_provider_install_test.module
- 11.x core/modules/system/tests/modules/lazy_route_provider_install_test/lazy_route_provider_install_test.module
Helper module for the lazy route provider tests.
File
-
core/
modules/ system/ tests/ modules/ lazy_route_provider_install_test/ lazy_route_provider_install_test.module
View source
<?php
/**
* @file
* Helper module for the lazy route provider tests.
*/
/**
* Implements hook_menu_links_discovered_alter().
*/
function lazy_route_provider_install_test_menu_links_discovered_alter(&$links) {
$message = \Drupal::state()->get(__FUNCTION__, 'success');
try {
// Ensure that calling this does not cause a recursive rebuild.
\Drupal::service('router.route_provider')->getAllRoutes();
} catch (\RuntimeException $e) {
$message = 'failed';
}
\Drupal::state()->set(__FUNCTION__, $message);
}
Functions
Title | Deprecated | Summary |
---|---|---|
lazy_route_provider_install_test_menu_links_discovered_alter | Implements hook_menu_links_discovered_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.