6.0.0-git
2019-03-24

[#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 2011-05-14 (2871 days ago)
Due
Updated 2011-06-28 (2826 days ago)
Assigned
Resolved 2011-06-28 (2826 days ago)
Milestone
Patch Yes

History
2011-06-28 16:39:41 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.
2011-06-28 16:38:40 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
2011-06-28 16:32:58 Jan Schneider Comment #8 Reply to this comment
Horde::menu() takes an optional 'mask' parameter that you can use:
Horde::menu(array('mask' => ..))
2011-06-28 07:36:49 vilius (at) lnk (dot) lt Comment #7 Reply to this comment
Ping?
2011-06-08 08:28:39 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?
2011-05-22 17:52:00 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.
2011-05-22 17:41:59 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.
2011-05-22 17:03:32 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?
2011-05-21 15:54:07 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
For which purpose? You can already set the mask in the constructor.
2011-05-14 12:43:13 vilius (at) lnk (dot) lt Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Add method to set a menu mask.
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
New Attachment: 0009-Add-method-to-set-a-menu-mask.patch Download
Reply to this comment
Patch adds method to set a menu mask.

Saved Queries