6.0.0-beta6
4/10/26

[#10078] Add method to set a menu mask.
Summary Add method to set a menu mask.
Queue Horde Framework Packages
Queue Version Git master
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester vilius (at) lnk (dot) lt
Created 5/14/11 (5445 days ago)
Due
Updated 6/28/11 (5400 days ago)
Assigned
Resolved 6/28/11 (5400 days ago)
Milestone
Patch Yes

History
06/28/2011 04:39:41 PM Jan Schneider Comment #10
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Still makes sense to add it because Horde::menu() is sometimes called 
outside the application. Make sure you require Horde_Core 1.3.0 if you 
want to use this in Ulaform.
06/28/2011 04:38:40 PM Git Commit Comment #9 Reply to this comment
Changes have been made in Git for this ticket:

Add method to set a menu mask.
Request: 10078
Signed-off-by: Jan Schneider <jan@horde.org>

  1 files changed, 10 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/3710e91d1c1f7c819acbf8276ae51f2e0f3880f6
06/28/2011 04:32:58 PM Jan Schneider Comment #8 Reply to this comment
Horde::menu() takes an optional 'mask' parameter that you can use:
Horde::menu(array('mask' => ..))
06/28/2011 07:36:49 AM vilius (at) lnk (dot) lt Comment #7 Reply to this comment
Ping?
06/08/2011 08:28:39 AM vilius (at) lnk (dot) lt Comment #6 Reply to this comment
Now that Ulaform is commited you can see how I used it here:

http://git.horde.org/co.php/ulaform/lib/Application.php?rt=horde-git&ws=1&r=836db350ef8cea4900a0b29a15ebe63b8431bb1e

I did not found any other way how to set masking cleanly. The only 
solution would be to construct the menu in every controller script 
like here:

http://git.horde.org/diff.php/passwd/templates/main/main.inc?rt=horde-git&ws=1&r1=caa9c90cec2ac47b89d089316818071295786424

Given that Ulaform has more menu buttons and you must include things 
like sidebar, etc. in every script this looked not right. But maybe 
it's just me?
05/22/2011 05:52:00 PM vilius (at) lnk (dot) lt Comment #5 Reply to this comment
*_Application::menu() is for generating application menus from 
*outside* of the application, e.g. preference screens.
At least in almost all released applications menu various menu 
parameters are set in -*_Application::menu() and then called with 
simple Horde::menu() in controller scripts. So I thought that setting 
a mask there should be cleaner.
05/22/2011 05:41:59 PM Jan Schneider Comment #4 Reply to this comment
No, menus are generated with Horde::menu() which takes the mask too. 
*_Application::menu() is for generating application menus from 
*outside* of the application, e.g. preference screens.
05/22/2011 05:03:32 PM vilius (at) lnk (dot) lt Comment #3 Reply to this comment
Maybe it's just me, but I did not found a way to pass a mask in 
application's Application.php menu() method. I'm assuming this is a 
standard way to create a menu now, right?
05/21/2011 03:54:07 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
For which purpose? You can already set the mask in the constructor.
05/14/2011 12:43:13 PM vilius (at) lnk (dot) lt Comment #1
State ⇒ New
New Attachment: 0009-Add-method-to-set-a-menu-mask.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Add method to set a menu mask.
Type ⇒ Enhancement
Priority ⇒ 1. Low
Reply to this comment
Patch adds method to set a menu mask.

Saved Queries