Skip to content

Support 'parent' option for auto-generated menus #4

@ReplicaObscura

Description

@ReplicaObscura

When auto-generating a menu, it should check for a 'parent' option being specified and place the menu under that parent instead.

How this should be done is yet to be determined. Simplest would be to simply pass a Menu object or a MenuItem object in for the 'parent' option, however when using MenuBuilder you might not actually have the underlying Menu or MenuItem.

Using the name of the menu to add it to is easy, but then defining which item under that to use might be difficult unless I create better ways of finding existing menu items in the stucture.

Maybe a 'hasChild($name) on Menu would work well enough. to be able to loop through a menu and drill down to a specific item.

We could then add getChild($name) to traverse the tree and return the correct MenuItem.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions