Problem/Motivation

Search module is to be deprecated.

function hook_menu_links_discovered_alter(&$links) {
  // Change the weight and title of the user.logout link.
  $links['user.logout']['weight'] = -10;
  $links['user.logout']['title'] = new \Drupal\Core\StringTranslation\TranslatableMarkup('Logout');
  // Conditionally add an additional link with a title that's not translated.
  if (\Drupal::moduleHandler()->moduleExists('search')) {
    $links['menu.api.search'] = [
      'title' => \Drupal::config('system.site')->get('name'),
      'route_name' => 'menu.api.search',
      'description' => new \Drupal\Core\StringTranslation\TranslatableMarkup('View popular search phrases for this site.'),
      'parent' => 'system.admin_reports',
    ];
  }
}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#6 3613273-nr-bot_n1chvg1b.txt549 bytesneeds-review-queue-bot

Issue fork drupal-3613273

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

quietone created an issue. See original summary.

danielveza made their first commit to this issue’s fork.

danielveza’s picture

Status: Active » Needs review

Swapped the Search reference over to Navigation. Rather than coming up with an example I used one of the links that the Navigation module creates.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Like the example replacement. Know navigation is safe in core for a while.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new549 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

danielveza’s picture

Status: Needs work » Needs review
Issue tags: +no-needs-review-bot

Pipeline is passing, assuming thats a false positive

quietone’s picture

Status: Needs review » Reviewed & tested by the community

Yea, this is a doc only change.

  • catch committed d7086b75 on main
    task: #3613273 Change use of Search module menu.api.php
    
    By: quietone
    By...
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Commit checks failed for me locally but it's because phpstan doesn't have any files to verify. I think we have an issue for that already so that it silently does nothing instead of blowing up, but explains the false positive.

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed d6ab6692 on 11.x
    task: #3613273 Change use of Search module menu.api.php
    
    By: quietone
    By...