Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

MenuUtil Class Reference

Static Public Member Functions

static resolveByCacheAndGetVisibleAndOrderedTabMenuByCurrentUser ()
static resolveByCacheAndGetVisibleAndOrderedTabMenuByUser ($user)
static resolveByCacheAndGetVisibleAndOrderedAdminTabMenuByCurrentUser ()
static resolveByCacheAndGetVisibleAndOrderedAdminTabMenuByUser ($user)
static getMenuViewItemsCacheIdentifierByUser ($user)
static getAdminMenuViewItemsCacheIdentifierByUser ($user)
static forgetCacheEntryForTabMenuByUser ($user)
static getVisibleAndOrderedTabMenuByCurrentUser ()
static getVisibleAndOrderedTabMenuByUser ($user)
static getCustomVisibleAndOrderedTabMenuItemsByUser ($user)
static getVisibleAndOrderedAdminTabMenuByCurrentUser ()
static getVisibleAndOrderedAdminTabMenuByUser ($user)
static getAccessibleShortcutsCreateMenuByCurrentUser ()
static getAccessibleShortcutsCreateMenuByUser ($user)
static getAccessibleConfigureMenuByCurrentUser ($moduleClassName)
static getAccessibleConfigureMenuByUser ($moduleClassName, $user)
static getAccessibleConfigureSubMenuByCurrentUser ($moduleClassName)
static getAccessibleConfigureSubMenuByUser ($moduleClassName, $user)
static getOrderedAccessibleHeaderMenuForCurrentUser ()
static getOrderedAccessibleHeaderMenuForUser ($user)
static getAccessibleOrderedUserHeaderMenuForCurrentUser ()
static getAccessibleOrderedUserHeaderMenuForUser ($user)
static getAccessibleModuleTabMenuByUser ($moduleClassName, $user)
static getAccessibleModuleAdminTabMenuByUser ($moduleClassName, $user)

Data Fields

const MENU_VIEW_ITEMS = 'MenuViewItems'
const ADMIN_MENU_VIEW_ITEMS = 'AdminMenuViewItems'

Static Protected Member Functions

static getMenuViewItemsCacheIdentifier ()
static getAdminMenuViewItemsCacheIdentifier ()
static getAccessibleHeaderMenuForCurrentUser ()
static getAccessibleHeaderMenuForUser ($user)
static orderHeaderMenuItems ($a, $b)
static resolveModuleMenuForAccess ($moduleClassName, array $menu, $user=null)
static doesUserHaveRightToViewMenuItem ($moduleClassName, $item, $user)
static getModuleOrderingForTabMenuByUser ($user)
static getModuleOrderingForAdminTabMenuByUser ($user)
static resolveMenuItemsForLanguageLocalization ($menuItems, $moduleClassName, $labelElements=array('label'), $urlElements=array('url'), $ajaxLinkOptionsElements=array('ajaxLinkOptions'))
static resolveTabMenuForDynamicLabelContent (&$items)

Detailed Description

Helper class for retrieving menus

Definition at line 40 of file MenuUtil.php.


Member Function Documentation

static resolveByCacheAndGetVisibleAndOrderedTabMenuByUser ( user  )  [static]
Parameters:
User $user
Returns:
array|mixed

Definition at line 55 of file MenuUtil.php.

static resolveByCacheAndGetVisibleAndOrderedAdminTabMenuByUser ( user  )  [static]
Parameters:
$user 
Returns:
array|mixed

Definition at line 82 of file MenuUtil.php.

static getMenuViewItemsCacheIdentifier (  )  [static, protected]

The menu view items cache identifier is a combination of the language and current user. This ensures if the user or language changes, that it properly retrieves the cache.

Definition at line 102 of file MenuUtil.php.

static getMenuViewItemsCacheIdentifierByUser ( user  )  [static]
Parameters:
$user 
Returns:
string

Definition at line 111 of file MenuUtil.php.

static getAdminMenuViewItemsCacheIdentifier (  )  [static, protected]

The admin menu view items cache identifier is a combination of the language and current user. This ensures if the user or language changes, that it properly retrieves the cache.

Definition at line 120 of file MenuUtil.php.

static getAdminMenuViewItemsCacheIdentifierByUser ( user  )  [static]
Parameters:
User $user
Returns:
string

Definition at line 129 of file MenuUtil.php.

static forgetCacheEntryForTabMenuByUser ( user  )  [static]
Parameters:
$user 

Definition at line 138 of file MenuUtil.php.

static getVisibleAndOrderedTabMenuByCurrentUser (  )  [static]

Get the tab menu items ordered and only the visible tabs based on the effective user setting for tab menu items. A module can have more than one top level menu item. Utilizes current user.

Returns:
array tab menu items

Definition at line 151 of file MenuUtil.php.

static getVisibleAndOrderedTabMenuByUser ( user  )  [static]
Parameters:
$user 
Returns:
array

Definition at line 160 of file MenuUtil.php.

static getCustomVisibleAndOrderedTabMenuItemsByUser ( user  )  [static]
Parameters:
$user 
Returns:
array

Definition at line 203 of file MenuUtil.php.

static getVisibleAndOrderedAdminTabMenuByCurrentUser (  )  [static]

Get the admin tab menu items ordered and only the visible tabs based on the effective user setting for tab menu items. A module can have more than one top level menu item. Utilizes current user.

Returns:
array tab menu items

Definition at line 225 of file MenuUtil.php.

static getVisibleAndOrderedAdminTabMenuByUser ( user  )  [static]
Parameters:
$user 
Returns:
array

Definition at line 234 of file MenuUtil.php.

static getAccessibleShortcutsCreateMenuByCurrentUser (  )  [static]

Get accessible shortcuts menu item based on the current user.

Returns:
array of menu items.

Definition at line 269 of file MenuUtil.php.

static getAccessibleShortcutsCreateMenuByUser ( user  )  [static]
Parameters:
$user 
Returns:
array

Definition at line 279 of file MenuUtil.php.

static getAccessibleConfigureMenuByCurrentUser ( moduleClassName  )  [static]

Get accessible coinfigure menu item based on the current user.

Returns:
array of menu items.

Definition at line 309 of file MenuUtil.php.

static getAccessibleConfigureMenuByUser ( moduleClassName,
user 
) [static]
Parameters:
string $moduleClassName
$user 
Returns:
menu

Definition at line 321 of file MenuUtil.php.

static getAccessibleConfigureSubMenuByCurrentUser ( moduleClassName  )  [static]
Parameters:
$moduleClassName 
Returns:
menu

Definition at line 336 of file MenuUtil.php.

static getAccessibleConfigureSubMenuByUser ( moduleClassName,
user 
) [static]
Parameters:
string $moduleClassName
$user 
Returns:
menu

Definition at line 348 of file MenuUtil.php.

static getOrderedAccessibleHeaderMenuForUser ( user  )  [static]
Parameters:
$user 
Returns:
array

Definition at line 369 of file MenuUtil.php.

static getAccessibleHeaderMenuForCurrentUser (  )  [static, protected]

Get accessible header menu item based on the specified module class name for the current user.

Returns:
array of menu items.

Definition at line 381 of file MenuUtil.php.

static getAccessibleOrderedUserHeaderMenuForCurrentUser (  )  [static]

Get accessible user header menu item based for the current user.

Returns:
array of menu items.

Definition at line 433 of file MenuUtil.php.

static getAccessibleOrderedUserHeaderMenuForUser ( user  )  [static]
Parameters:
$user 
Returns:
array

Definition at line 443 of file MenuUtil.php.

static getAccessibleModuleTabMenuByUser ( moduleClassName,
user 
) [static]

Public for testing purposes only.

Returns:
array of accessible tab menu items

Definition at line 481 of file MenuUtil.php.

static getAccessibleModuleAdminTabMenuByUser ( moduleClassName,
user 
) [static]

Public for testing purposes only.

Returns:
array of accessible admin tab menu items

Definition at line 504 of file MenuUtil.php.

static resolveModuleMenuForAccess ( moduleClassName,
array $  menu,
user = null 
) [static, protected]

Currently only supports one level of nesting.

Definition at line 526 of file MenuUtil.php.

static doesUserHaveRightToViewMenuItem ( moduleClassName,
item,
user 
) [static, protected]
Returns:
boolean true if user has right to view menu items

Definition at line 558 of file MenuUtil.php.

static getModuleOrderingForTabMenuByUser ( user  )  [static, protected]

Temporarily statically defined until we implement module sorting/visibility for tab menu items.

Definition at line 574 of file MenuUtil.php.

static getModuleOrderingForAdminTabMenuByUser ( user  )  [static, protected]

Temporarily statically defined until we implement module sorting/visibility for tab menu items.

Definition at line 594 of file MenuUtil.php.

static resolveMenuItemsForLanguageLocalization ( menuItems,
moduleClassName,
labelElements = array('label'),
urlElements = array('url'),
ajaxLinkOptionsElements = array('ajaxLinkOptions') 
) [static, protected]

Given a menu item array, each label element, specified by $labelElements, will be iterated over and translated for the current user's language.

Returns:
menu item array

Definition at line 616 of file MenuUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Jun 25 07:11:02 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8