You are here

function dblog_menu_links_discovered_alter in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/dblog/dblog.module \dblog_menu_links_discovered_alter()
  2. 10 core/modules/dblog/dblog.module \dblog_menu_links_discovered_alter()

Implements hook_menu_links_discovered_alter().

File

core/modules/dblog/dblog.module, line 46
System monitoring and logging for administrators.

Code

function dblog_menu_links_discovered_alter(&$links) {
  if (\Drupal::moduleHandler()
    ->moduleExists('search')) {
    $links['dblog.search'] = [
      'title' => new TranslatableMarkup('Top search phrases'),
      'route_name' => 'dblog.search',
      'description' => new TranslatableMarkup('View most popular search phrases.'),
      'parent' => 'system.admin_reports',
    ];
  }
  return $links;
}