Allow SystemMenuBlock tree manipulators to be altered

Created on 19 February 2017, over 7 years ago
Updated 22 August 2023, 10 months ago

Problem/Motivation

At the moment every contrib module that needs to add/alter tree manipulators require to override Drupal\system\Plugin\Block\SystemMenuBlock (or implement their own).

The only possible solution for contrib now is to override block class via hook_block_alter() but when more then one module installed only last override wins.
This collisions affects following contrib modules:
- https://www.drupal.org/project/superfish →
- https://www.drupal.org/project/menu_multilingual →
- https://www.drupal.org/project/menu_block →
- https://www.drupal.org/project/domain_entity → to incorporate https://github.com/skilld-labs/domain_menu_access
- https://www.drupal.org/project/menu_per_role →
- https://www.drupal.org/project/menu_item_visibility →
- https://www.drupal.org/project/menu_manipulator →

Proposed resolution

Implement a new hook that allows menu tree manipulators to be altered.

Remaining tasks

- Decide on hook name - hook_system_menu_tree_manipulators_alter()
- File change record
- Commit

User interface changes

No

API additions

Adds hook_system_menu_tree_manipulators_alter to alter manipulators used in menu blocks

Data model changes

No

✨ Feature request
Status

Needs work

Version

11.0 🔥

Component
System  →

Last updated 1 day ago

No maintainer
Created by

🇫🇮Finland tuutti

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024