Allow SystemMenuBlock tree manipulators to be altered

Created on 19 February 2017, about 8 years ago
Updated 6 September 2024, 7 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

Closed: duplicate

Version

11.0 🔥

Component
System 

Last updated about 2 hours ago

No maintainer
Created by

🇫🇮Finland tuutti

Live updates comments and jobs are added and updated live.
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.71.5 2024