View Issue Details

IDProjectCategoryView StatusLast Update
0024590mantisbtplug-inspublic2019-07-15 19:06
Reporterjamesvii Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version2.15.0 
Target Version2.22.0Fixed in Version2.22.0 
Summary0024590: Add EVENT_MENU_MAIN_FILTER to allow complete customisation of main menu
Description

See https://github.com/mantisbt/mantisbt/pull/1365

This patch modifies the way the main sidebar menu is built; menu items are all assembled in an array first, which is then given the chance to be altered by plugins using a new chain filter EVENT_MENU_MAIN_FILTER.

This allows plugins to do a few things that currently isn't possible, especially to the hard-coded items (My View, View Bugs), such as re-order the items, change the icon, or remove them. It also allows plugins to insert new items anywhere in the menu (not just the start or end). Additionally, by returning an empty array, plugins can get rid of the sidebar entirely.

This is partly inspired by the way Wordpress allows plugins to alter admin menu item, and by our need to remove the My View item in certain circumstances.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master fc6c2a9c

2019-07-15 18:58:43

dregad

Details Diff
Add new chain event EVENT_MENU_MAIN_FILTER

Allow plugins to customize the complete main sidebar menu before being
output.

Fixes 0024590, PR https://github.com/mantisbt/mantisbt/pull/1365
Affected Issues
0024590
mod - core/events_inc.php Diff File
mod - core/layout_api.php Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference_Output.xml Diff File

Issue History

Date Modified Username Field Change
2018-07-05 09:12 jamesvii New Issue
2018-07-05 09:35 atrol Assigned To => community
2018-07-05 09:35 atrol Status new => assigned
2019-07-15 19:01 dregad Assigned To community => dregad
2019-07-15 19:01 dregad Target Version => 2.22.0
2019-07-15 19:06 dregad Changeset attached => MantisBT master fc6c2a9c
2019-07-15 19:06 dregad Status assigned => resolved
2019-07-15 19:06 dregad Resolution open => fixed
2019-07-15 19:06 dregad Fixed in Version => 2.22.0