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
string
Translation 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_SubMenuItem
addAgendaSetupPage(string $label, string $privilege, string $controller, array $other = array()
) : \Gems_Menu_SubMenuItem
. menu item
string
string
string
array
\Gems_Menu_SubMenuItem
addAskPage(string $label)
This function is in \Gems_Menu instead of AbstractMenu because you should ALWAYS put this menu in the root menu.
string
Label 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_SubMenuItem
addButtonOnly(string $label, string $privilege, string $controller, string $action= 'index'
, array $other= array()
) : \Gems_Menu_SubMenuItem
string
string
string
string
array
\Gems_Menu_SubMenuItem
addCalendarPage(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItem
addCommSetupMenu(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItem
addContactPage(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.
string
Label for the whole menu
\Gems_Menu_MenuAbstract
The new contact pageaddContainer($label, $privilege= null
, array $other= array()
)
addExportContainer(string $label) : \Gems_Menu_MenuAbstract
string
Label for the container
\Gems_Menu_MenuAbstract
The new contact pageaddFilePage(string $label, string $privilege, string $controller, array $other = array()
) : \Gems_Menu_SubMenuItem
string
The label to display for the menu item, null for access without display
string
The privilege for the item, null is always, 'pr.islogin' must be logged in, 'pr.nologin' only when not logged in.
string
What controller to use
array
Array of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItem
addGemsSetupContainer(string $label)
This function is in \Gems_Menu instead of AbstractMenu because you should ALWAYS put this menu in the root menu.
string
Label for the whole menu
addGroupsPage(string $label, array $other = array()
) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItem
addHiddenPrivilege(string $privilege, string $label = null
) : \Gems_Menu
string
string
\Gems_Menu
addImportContainer(string $label) : \Gems_Menu_MenuAbstract
string
Label for the container
\Gems_Menu_MenuAbstract
The new contact pageaddLogControllers()
addLogonOffToken()
addOpenRosaContainer(string $label, $parent = null
)
Should be enabled in application.ini by using useOpenRosa = 1
string
Label for the container
addPage(string $label, string $privilege, string $controller, string $action= 'index'
, array $other= array()
) : \Gems_Menu_SubMenuItem
string
The label to display for the menu item, null for access without display
string
The privilege for the item, null is always, 'pr.islogin' must be logged in, 'pr.nologin' only when not logged in.
string
What controller to use
string
The name of the action
array
Array of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItem
addPlanPage(string $label) : \Gems_Menu_SubMenuItem
string
The label to display for the menu item, null for access without display
\Gems_Menu_SubMenuItem
addProjectInfoPage(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItem
addProjectPage(string $label) : \Gems_Menu_SubMenuItem
string
\Gems_Menu_SubMenuItem
addRespondentPage(string $label) : \Gems_Menu_MenuAbstract
string
Label for the container
\Gems_Menu_MenuAbstract
The new respondent pageaddStaffPage(string $label, array $other = array()
) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItem
addTrackBuilderMenu(string $label, array $other = array()
) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItem
find(\Zend_Controller_Request_Abstract|array $request) : \Gems_Menu_SubMenuItem | null
\Zend_Controller_Request_Abstract
array
\Gems_Menu_SubMenuItem
null
findAll($request)
findAllowedController(string $controller, string $action = 'index'
) : \Gems_SubMenuItem
string
string
\Gems_SubMenuItem
findController(string $controller, string $action = 'index'
) : \Gems_SubMenuItem
string
string
\Gems_SubMenuItem
findFirst($request)
getActivePath(\Zend_Controller_Request_Abstract $request)
getChildren() : array
array
of type \Gems_Menu_SubMenuItemgetCurrent() : \Gems_Menu_SubMenuItem
\Gems_Menu_SubMenuItem
getCurrentChildren()
getCurrentMenuList(\Zend_Controller_Request_Abstract $request, $parentLabel = null
) : \Gems_Menu_MenuList
\Zend_Controller_Request_Abstract
\Gems_Menu_MenuList
getCurrentParent() : \Gems_Menu_SubMenuItem
\Gems_Menu_SubMenuItem
getMenuList() : \Gems_Menu_MenuList
\Gems_Menu_MenuList
getParameterSource() : \Gems_Menu_ParameterSource
\Gems_Menu_ParameterSource
getUsedPrivileges() : array
array
hasChildren()
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 |
---|
string
Singular translation string
string
Plural translation string
integer
Number for detecting the correct plural
string
\Zend_Locale
(Optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information
string
render(\Zend_View_Abstract $view) : string
The $view is used to correctly encode and escape the output
\Zend_View_Abstract
string
Correctly 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_HtmlElement
toTopLevelElement() : \MUtil_Html_HtmlElement
\MUtil_Html_HtmlElement
_addUsedPrivileges(array $privileges, $label)
array
_getOriginalRequest() : \Zend_Controller_Request_Abstract
\Zend_Controller_Request_Abstract
add(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_SubMenuItem
applyAcl(\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_SubMenuItem
null
findItemPath($options)
findItems($options, array $results)
renderFirst() : \MUtil_Html_ListElement
Allows overloading by sub classes.
\MUtil_Html_ListElement
renderItems(\MUtil_Html_ListElement $ul, array $items, boolean $cascade)
Allows overloading by sub classes.
\MUtil_Html_ListElement
array
boolean
render nested items
request2find($request)
setBranchVisible(array $activeBranch) : \Gems_Menu_MenuAbstract
array
Of \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