Cannot subclass MenuSource plugin due to private method getMenuItem()

Created on 30 March 2025, 3 days ago

Problem/Motivation

As discussed at DrupalCon Atlanta, we want to extend the MenuSource UIPatterns Source plugin so we can decorate it with the rendered content of each menu item (from menu item extras).

This fails with a not found exception, because the method we want to override is private.

Steps to reproduce

Create a new plugin that extends the MenuContent plugin, and attempt to implement getMenuItems().

Whitescreen error.

Proposed resolution

Make MenuSource::getMenuItems a protected method instead of private.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024