Problem/Motivation

The hook_install() implementation shows a link to the module settings page, but that is not necessary, since that link is already provided in the page showing the list of all the modules.

Proposed resolution

Remove the following code from multiple_email_install().

  $link_text_parts = [
    new TranslatableMarkup('Administer'),
    new TranslatableMarkup('Configuration'),
    new TranslatableMarkup('People'),
    new TranslatableMarkup('Multiple email'),
  ];
  $link_text = implode(' > ', $link_text_parts);

  $link = Link::createFromRoute($link_text, 'multiple_email.admin.settings');

  $message = new TranslatableMarkup('Multiple email settings are available under @link', [
    '@link' => $link->toString(),
  ]);

  Drupal::messenger()->addMessage($message);

Code showing a link should not try to build its breadcrumb; that is not how links are shown in Drupal.

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

avpaderno created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Status: Active » Needs review

  • avpaderno committed ba2bb7d0 on 3.x
    Issue #3591738: Remove the code that in hook_install() shows the link to...
avpaderno’s picture

Version: 3.x-dev » 2.x-dev

avpaderno’s picture

Status: Needs review » Reviewed & tested by the community

  • avpaderno committed f97cb7b7 on 2.x
    Issue #3591738: Remove the code that in hook_install() shows the link to...
avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

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.