This is the generic Menu class to be extended by the project
It loads the menu in two stages:
$this->loadDefaultMenu() Normally you should not touch this to make upgrading easier
| package | Gems |
|---|---|
| subpackage | Menu |
| copyright | Copyright (c) 2011 Erasmus MC |
| license | New BSD License |
| since | Class available since version 1.0 |
| inherited_from | \Gems_Menu_MenuAbstract |
_(string $text, string|\Zend_Locale $locale = null) : string
Translates the given string returns the translation
stringTranslation string
string\Zend_Locale(optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string__construct(\GemsEscort $escort)
| inherited_from | \Gems_Menu_MenuAbstract::__construct() |
|---|
__construct(\GemsEscort $escort)
addAgendaSetupMenu(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItemaddAgendaSetupPage(string $label, string $privilege, string $controller, array $other = array()) : \Gems_Menu_SubMenuItem
. menu item
string
string
string
array
\Gems_Menu_SubMenuItemaddAskPage(string $label)
This function is in \Gems_Menu instead of AbstractMenu because you should ALWAYS put this menu in the root menu.
stringLabel for the whole menu
addBrowsePage(string $label, string $privilege, string $controller, array $other = array()) : \Gems_Menu_SubMenuItem
. menu item
string
string
string
array
\Gems_Menu_SubMenuItemaddButtonOnly(string $label, string $privilege, string $controller, string $action= 'index', array $other= array()) : \Gems_Menu_SubMenuItem
string
string
string
string
array
\Gems_Menu_SubMenuItemaddCalendarPage(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItemaddCommSetupMenu(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItemaddContactPage(string $label) : \Gems_Menu_MenuAbstract
This function is in \Gems_Menu instead of AbstractMenu because you should ALWAYS put this menu in the root menu.
stringLabel for the whole menu
\Gems_Menu_MenuAbstractThe new contact pageaddContainer($label, $privilege= null, array $other= array())
addExportContainer(string $label) : \Gems_Menu_MenuAbstract
stringLabel for the container
\Gems_Menu_MenuAbstractThe new contact pageaddFilePage(string $label, string $privilege, string $controller, array $other = array()) : \Gems_Menu_SubMenuItem
stringThe label to display for the menu item, null for access without display
stringThe privilege for the item, null is always, 'pr.islogin' must be logged in, 'pr.nologin' only when not logged in.
stringWhat controller to use
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItemaddGemsSetupContainer(string $label)
This function is in \Gems_Menu instead of AbstractMenu because you should ALWAYS put this menu in the root menu.
stringLabel for the whole menu
addGroupsPage(string $label, array $other = array()) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItemaddHiddenPrivilege(string $privilege, string $label = null) : \Gems_Menu
string
string
\Gems_MenuaddImportContainer(string $label) : \Gems_Menu_MenuAbstract
stringLabel for the container
\Gems_Menu_MenuAbstractThe new contact pageaddLogControllers()
addLogonOffToken()
addOpenRosaContainer(string $label, $parent = null)
Should be enabled in application.ini by using useOpenRosa = 1
stringLabel for the container
addPage(string $label, string $privilege, string $controller, string $action= 'index', array $other= array()) : \Gems_Menu_SubMenuItem
stringThe label to display for the menu item, null for access without display
stringThe privilege for the item, null is always, 'pr.islogin' must be logged in, 'pr.nologin' only when not logged in.
stringWhat controller to use
stringThe name of the action
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItemaddPlanPage(string $label) : \Gems_Menu_SubMenuItem
stringThe label to display for the menu item, null for access without display
\Gems_Menu_SubMenuItemaddProjectInfoPage(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItemaddProjectPage(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItemaddRespondentPage(string $label) : \Gems_Menu_MenuAbstract
stringLabel for the container
\Gems_Menu_MenuAbstractThe new respondent pageaddStaffPage(string $label, array $other = array()) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItemaddTrackBuilderMenu(string $label, array $other = array()) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItemfind(\Zend_Controller_Request_Abstract|array $request) : \Gems_Menu_SubMenuItem | null
\Zend_Controller_Request_Abstractarray
\Gems_Menu_SubMenuItemnull
findAll($request)
findAllowedController(string $controller, string $action = 'index') : \Gems_SubMenuItem
string
string
\Gems_SubMenuItemfindController(string $controller, string $action = 'index') : \Gems_SubMenuItem
string
string
\Gems_SubMenuItemfindFirst($request)
getActivePath(\Zend_Controller_Request_Abstract $request)
getChildren() : array
arrayof type \Gems_Menu_SubMenuItemgetCurrent() : \Gems_Menu_SubMenuItem
\Gems_Menu_SubMenuItemgetCurrentChildren()
getCurrentMenuList(\Zend_Controller_Request_Abstract $request, $parentLabel = null) : \Gems_Menu_MenuList
\Zend_Controller_Request_Abstract
\Gems_Menu_MenuListgetCurrentParent() : \Gems_Menu_SubMenuItem
\Gems_Menu_SubMenuItemgetMenuList() : \Gems_Menu_MenuList
\Gems_Menu_MenuListgetParameterSource() : \Gems_Menu_ParameterSource
\Gems_Menu_ParameterSourcegetUsedPrivileges() : array
arrayhasChildren()
isTopLevel()
| inherited_from | \Gems_Menu_MenuAbstract::isTopLevel() |
|---|
isTopLevel()
isVisible()
| inherited_from | \Gems_Menu_MenuAbstract::isVisible() |
|---|
isVisible()
loadDefaultMenu()
loadProjectMenu()
plural(string $singular, string $plural, integer $number, string|\Zend_Locale $locale = null) : string
Translates the given string using plural notations Returns the translated string
| see |
|---|
stringSingular translation string
stringPlural translation string
integerNumber for detecting the correct plural
string\Zend_Locale(Optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
stringrender(\Zend_View_Abstract $view) : string
The $view is used to correctly encode and escape the output
\Zend_View_Abstract
stringCorrectly encoded and escaped html outputsetCurrent(\Gems_Menu_SubMenuItem $item)
setOnlyActiveBranchVisible($value = true)
setVisible($value = true)
sortByOrder() : \Gems_Menu_MenuAbstract
\Gems_Menu_MenuAbstract(continuation pattern)sortOrder(self $aItem, self $bItem) : integer
toActiveBranchElement() : \MUtil_Html_HtmlElement
\MUtil_Html_HtmlElementtoTopLevelElement() : \MUtil_Html_HtmlElement
\MUtil_Html_HtmlElement_addUsedPrivileges(array $privileges, $label)
array
_getOriginalRequest() : \Zend_Controller_Request_Abstract
\Zend_Controller_Request_Abstractadd(array $args_array) : \Gems_Menu_SubMenuItem
The argumenets can be any of those used for \Zend_Navigation_Page as well as some Gems specials.
| see |
|---|
array\MUtil_Ra::args array with defaults 'visible' and 'allowed' true.
\Gems_Menu_SubMenuItemapplyAcl(\Zend_Acl $acl, string $userRole) : \Gems_Menu_MenuAbstract
\Zend_Acl
string
\Gems_Menu_MenuAbstract(continuation pattern)findItem(\<type> $options, \<type> $findDeep = true) : \Gems_Menu_SubMenuItem | null
\<type>
\<type>
\Gems_Menu_SubMenuItemnull
findItemPath($options)
findItems($options, array $results)
renderFirst() : \MUtil_Html_ListElement
Allows overloading by sub classes.
\MUtil_Html_ListElementrenderItems(\MUtil_Html_ListElement $ul, array $items, boolean $cascade)
Allows overloading by sub classes.
\MUtil_Html_ListElement
array
booleanrender nested items
request2find($request)
setBranchVisible(array $activeBranch) : \Gems_Menu_MenuAbstract
arrayOf \Gems_Menu_Menu Abstract items
\Gems_Menu_MenuAbstract(continuation pattern)setForChildren($key, $value)
_findPath($request)
$escort : \GemsEscort
$verbose : boolean
false$_subItems
array()$translateAdapter : \Zend_Translate_Adapter
$user : \Gems_User_User
$_currentMenuItem : \Gems_Menu_SubMenuItem
$_hiddenPrivileges
array()$_onlyActiveBranchVisible
false$_visible
true