Sub menu items are all menu items except the main Menu item.
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()
see | |
---|---|
see | |
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, \Gems_Menu_MenuAbstract $parent, array $options)
inherited_from | \Gems_Menu_MenuAbstract::__construct() |
---|
__construct(\GemsEscort $escort)
__toString()
addAction(string $label, string $privilege= null
, string $action= 'index'
, array $other= array()
) : \Gems_Menu_SubMenuItem
string
The label to display for the menu item
string
The privilege for the item
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
addActionButton(string $label, string $privilege= null
, string $action= 'index'
, array $other= array()
) : \Gems_Menu_SubMenuItem
string
The label to display for the menu item
string
The privilege for the item
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
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
addAutofilterAction() : \Gems_Menu_SubMenuItem
\Gems_Menu_SubMenuItem
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
addContainer($label, $privilege= null
, array $other= array()
)
addCreateAction(string $privilege= null
, array $other= array()
) : \Gems_Menu_SubMenuItem
string
The privilege for the item, defaults to parent + .create when not specified
array
Array of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubMenuItem
addDeReactivateAction(string $checkField, string $deactivateOn= 1
, string $reactivateOn= 1
, array $otherDeact= array()
, array $otherReact= array()
) : array
string
The name of the field to filter on for deactivation
string
The value to check against for deactivation, no menu item when null
string
The value to check against for reactivation, no menu item when null
array
Array of extra options for deactivate item, e.g. 'visible', 'allowed', 'class', 'icon', 'privilege', 'target', 'type', 'button_only'.
array
Array of extra options for reactivate item, e.g. 'visible', 'allowed', 'class', 'icon', 'privilege', 'target', 'type', 'button_only'.
array
of \Gems_Menu_SubmenuItemaddDeleteAction(string $privilege= null
, array $other= array()
) : \Gems_Menu_SubmenuItem
string
A privilege name, defaults to parent + .delete when not specified
array
Array of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', target', 'type', 'button_only'.
\Gems_Menu_SubmenuItem
addEditAction(string $privilege= null
, array $other= array()
) : \Gems_Menu_SubmenuItem
string
A privilege name, defaults to parent + .edit when not specified
array
Array of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubmenuItem
addExcelAction() : \Gems_Menu_SubmenuItem
\Gems_Menu_SubmenuItem
addExportAction() : \Gems_Menu_SubmenuItem
\Gems_Menu_SubmenuItem
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
addGroupsPage(string $label, array $other = array()
) : \Gems_Menu_SubMenuItem
string
array
\Gems_Menu_SubMenuItem
addHiddenParameter(string $name, mixed $value = null
) : \Gems_Menu_SubMenuItem
addImportAction(string $privilege= null
, array $other= array()
) : \Gems_Menu_SubmenuItem
string
A privilege name, defaults to parent + .import when not specified
array
Array of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubmenuItem
addImportContainer(string $label) : \Gems_Menu_MenuAbstract
string
Label for the container
\Gems_Menu_MenuAbstract
The 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
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
addParameterFilter($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
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
addShowAction(string $privilege= null
, array $other= array()
) : \Gems_Menu_SubmenuItem
string
A privilege name, defaults to parent + .show when not specified
array
Array of extra options for this item, e.g. 'visible', 'allowed', 'class', 'icon', 'target', 'type', 'button_only'
\Gems_Menu_SubmenuItem
addStaffPage(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
applyHiddenParameters(\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
mixed
The value should be identical or when null, should not exist or be null
boolean
True if all values where setget($key, $default = null
)
getChildren() : array
array
of type \Gems_Menu_SubMenuItemgetParameters()
getParent() : \Gems_Menu_MenuAbstract
\Gems_Menu_MenuAbstract
has(string $key) : boolean
string
boolean
hasChildren()
is($key, $value)
isAllowed() : boolean
boolean
isTopLevel()
inherited_from | \Gems_Menu_MenuAbstract::isTopLevel() |
---|
isTopLevel()
isVisible() : boolean
inherited_from | \Gems_Menu_MenuAbstract::isVisible() |
---|
boolean
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 |
---|
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
removeParameters()
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_AElement
toActionLinkLower(mixed $parameterSources_args = null
) : \MUtil_Html_AElement
mixed
\MUtil_Html_AElement
toHRefAttribute(mixed $parameterSources_args = null
) : \MUtil_Html_HrefArrayAttribute
mixed
\MUtil_Html_HrefArrayAttribute
toRouteUrl($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_SubMenuItem
applyAcl(\Zend_Acl $acl, string $userRole) : \Gems_Menu_MenuAbstract
\Zend_Acl
string
\Gems_Menu_MenuAbstract
(continuation pattern)findItem(\<type> $options, \<type> $findDeep = true
)
inherited_from | \Gems_Menu_MenuAbstract::findItem() |
---|
findItem(\<type> $options, \<type> $findDeep = true
) : \Gems_Menu_SubMenuItem | null
\<type>
\<type>
\Gems_Menu_SubMenuItem
null
findItemPath($options)
inherited_from | \Gems_Menu_MenuAbstract::findItemPath() |
---|
findItemPath($options)
findItems($options, array $results)
inherited_from | \Gems_Menu_MenuAbstract::findItems() |
---|
findItems($options, array $results)
notSet($key_args)
setBranchVisible(array $activeBranch) : \Gems_Menu_MenuAbstract
array
Of \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_ParameterCollector
A source of parameter values
array
A usually empty array of parameters that is filled from the sources
boolean
When true, no lazyness is returned
boolean
Or lazy condition. When true menu item is enabled otherwise false_toHRef(\Gems_Menu_ParameterCollector $source, boolean $condition) : \MUtil_Html_HrefArrayAttribute
\Gems_Menu_ParameterCollector
A parameter source collection
boolean
When 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