function menu_test_init

Implements hook_init().

File

drupal/core/modules/system/tests/modules/menu_test/menu_test.module, line 407
Dummy module implementing hook menu.

Code

function menu_test_init() {

  // When requested by one of the MenuTrailTestCase tests, record the initial
  // active trail during Drupal's bootstrap (before the user is redirected to a
  // custom 403 or 404 page). See menu_test_custom_403_404_callback().
  if (state()
    ->get('menu_test.record_active_trail') ?: FALSE) {
    state()
      ->set('menu_test.active_trail_initial', menu_get_active_trail());
  }
}