A container item is one that gathers multiple sub menu items, but does not have it's own controller/action pair but selects the first sub item instead.
Sub menu items "masks" three type of items:
Menu items are displayed when:
The parameter values must be supplied when requesting to draw a menu item. Valid sources for parameter values are:
Button items are only displayed through toActionLink()
| package | Gems |
|---|---|
| subpackage | Menu |
| copyright | Copyright (c) 2011 Erasmus MC |
| license | New BSD License |
| since | Class available since version 1.5.5 |
| inherited_from | \Gems_Menu_SubMenuItem |
_(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)
__toString()
addAction(string $label, string $privilege= null, string $action= 'index', array $other= array()) : \Gems_Menu_SubMenuItem
stringThe label to display for the menu item
stringThe privilege for the item
stringThe name of the action
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItemaddActionButton(string $label, string $privilege= null, string $action= 'index', array $other= array()) : \Gems_Menu_SubMenuItem
stringThe label to display for the menu item
stringThe privilege for the item
stringThe name of the action
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItemaddAgendaSetupMenu(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_SubMenuItemaddAutofilterAction() : \Gems_Menu_SubMenuItem
\Gems_Menu_SubMenuItemaddBrowsePage(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_SubMenuItemaddContainer($label, $privilege= null, array $other= array())
addCreateAction(string $privilege= null, array $other= array()) : \Gems_Menu_SubMenuItem
stringThe privilege for the item, defaults to parent + .create when not specified
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItemaddDeReactivateAction(string $checkField, string $deactivateOn= 1, string $reactivateOn= 1, array $otherDeact= array(), array $otherReact= array()) : array
stringThe name of the field to filter on for deactivation
stringThe value to check against for deactivation, no menu item when null
stringThe value to check against for reactivation, no menu item when null
arrayArray of extra options for deactivate item, e.g. 'visible', 'allowed', 'class', 'icon', 'privilege', 'target', 'type', 'button_only'.
arrayArray of extra options for reactivate item, e.g. 'visible', 'allowed', 'class', 'icon', 'privilege', 'target', 'type', 'button_only'.
arrayof \Gems_Menu_SubmenuItemaddDeleteAction(string $privilege= null, array $other= array()) : \Gems_Menu_SubmenuItem
stringA privilege name, defaults to parent + .delete when not specified
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', target', 'type', 'button_only'.
\Gems_Menu_SubmenuItemaddEditAction(string $privilege= null, array $other= array()) : \Gems_Menu_SubmenuItem
stringA privilege name, defaults to parent + .edit when not specified
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubmenuItemaddExcelAction() : \Gems_Menu_SubmenuItem
\Gems_Menu_SubmenuItemaddExportAction() : \Gems_Menu_SubmenuItem
\Gems_Menu_SubmenuItemaddExportContainer(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_SubMenuItemaddGroupsPage(string $label, array $other = array()) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItemaddHiddenParameter(string $name, mixed $value = null) : \Gems_Menu_SubMenuItem
addImportAction(string $privilege= null, array $other= array()) : \Gems_Menu_SubmenuItem
stringA privilege name, defaults to parent + .import when not specified
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubmenuItemaddImportContainer(string $label) : \Gems_Menu_MenuAbstract
stringLabel for the container
\Gems_Menu_MenuAbstractThe new contact pageaddLogControllers()
addNamedParameters(mixed $arrayOrKey1= null, $altName1= null) : \Gems_Menu_SubMenuItem
Numeric array keys are changed into the same string as the array value.
mixed\MUtil_Ra::pairs named array
\Gems_Menu_SubMenuItem(continuation pattern)addOptionalParameters($arrayOrKey1= null, $altName1= null)
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_SubMenuItemaddParameterFilter($arrayOrKey1= null, $value1= null)
addParameters($arrayOrKey1= null, $key2= null)
addPdfButton($label, $privilege, $controller= null, $action= 'pdf', array $other= array())
addPlanPage(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_SubMenuItemaddShowAction(string $privilege= null, array $other= array()) : \Gems_Menu_SubmenuItem
stringA privilege name, defaults to parent + .show when not specified
arrayArray of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubmenuItemaddStaffPage(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_SubMenuItemapplyHiddenParameters(\Zend_Controller_Request_Abstract $request, \Gems_Menu_ParameterSource $source)
applyToRequest(\Zend_Controller_Request_Abstract $request)
checkParameterFilter(mixed $arrayOrKey1, mixed $value1 = null) : boolean
mixed\MUtil_Ra:pairs() name => value argument pairs
mixedThe value should be identical or when null, should not exist or be null
booleanTrue if all values where setget($key, $default = null)
getChildren() : array
arrayof type \Gems_Menu_SubMenuItemgetParameters()
getParent() : \Gems_Menu_MenuAbstract
\Gems_Menu_MenuAbstracthas(string $key) : boolean
string
booleanhasChildren()
is($key, $value)
isAllowed() : boolean
booleanisTopLevel()
isVisible()
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
stringremoveParameters()
set($key, $value)
setHiddenOrgId(\type $orgId) : \Gems_Menu_SubMenuItem
\type
\Gems_Menu_SubMenuItem(continuation pattern)setModelParameters(integer $idCount) : \Gems_Menu_SubMenuItem
setNamedParameters(mixed $arrayOrKey1= null, mixed $key2= null) : \Gems_Menu_SubMenuItem
Numeric array keys are changed into the same string as the array value.
mixed\MUtil_Ra::pairs named array
mixed
\Gems_Menu_SubMenuItem(continuation pattern)setParameterFilter($arrayOrKey1= null, $value1= null)
sortByOrder() : \Gems_Menu_MenuAbstract
\Gems_Menu_MenuAbstract(continuation pattern)sortOrder(self $aItem, self $bItem) : integer
toActionLink($parameterOrLabelSources_args = null) : \MUtil_Html_AElement
\MUtil_Html_AElementtoActionLinkLower(mixed $parameterSources_args = null) : \MUtil_Html_AElement
mixed
\MUtil_Html_AElementtoHRefAttribute(mixed $parameterSources_args = null) : \MUtil_Html_HrefArrayAttribute
mixed
\MUtil_Html_HrefArrayAttributetoRouteUrl($parameterSources_args = null)
toUl($actionController = null)
_addUsedPrivileges(array $privileges, $label)
array
_getOriginalRequest() : \Zend_Controller_Request_Abstract
\Zend_Controller_Request_Abstract_toRouteArray(\Gems_Menu_ParameterCollector $source)
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_SubMenuItemapplyAcl(\Zend_Acl $acl, string $userRole) : \Gems_Menu_MenuAbstract
\Zend_Acl
string
\Gems_Menu_MenuAbstract(continuation pattern)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_SubMenuItemnull
findItemPath($options)
findItems($options, array $results)
notSet($key_args)
setBranchVisible(array $activeBranch) : \Gems_Menu_MenuAbstract
arrayOf \Gems_Menu_Menu Abstract items
\Gems_Menu_MenuAbstract(continuation pattern)setBranchVisible(array $activeBranch) : \Gems_Menu_MenuAbstract
arrayOf \Gems_Menu_Menu Abstract items
\Gems_Menu_MenuAbstract(continuation pattern)setForChildren($key, $value)
_applyParameterFilter(\Gems_Menu_ParameterCollector $source, boolean $raiseConditions, mixed $condition) : boolean
\Gems_Menu_ParameterCollector
boolean
mixed
boolean_applyParameterSource(\Gems_Menu_ParameterCollector $source, array $parameters)
_applyParameterSources(\Gems_Menu_ParameterCollector $source, array $parameters, boolean $raiseConditions) : boolean
\Gems_Menu_ParameterCollectorA source of parameter values
arrayA usually empty array of parameters that is filled from the sources
booleanWhen true, no lazyness is returned
booleanOr lazy condition. When true menu item is enabled otherwise false_getSessionStore($label) : \Zend_Session_Namespace
\Zend_Session_Namespace_toHRef(\Gems_Menu_ParameterCollector $source, boolean $condition) : \MUtil_Html_HrefArrayAttribute
\Gems_Menu_ParameterCollectorA parameter source collection
booleanWhen true the system may create a Lazy condition for the url
\MUtil_Html_HrefArrayAttribute_toLi(\Gems_Menu_ParameterCollector $source)
check(array $options)
$escort : \GemsEscort
$_subItems
array()$translateAdapter : \Zend_Translate_Adapter
$user : \Gems_User_User
$_hiddenOrgId
$_hiddenParameters
$_itemOptions
$_parameterFilter
$_parameters
true$_parent
$_requiredParameters
$_sessionStore : \Zend_Session_Namespace