CRM_Core_Menu
in package
Class CRM_Core_Menu.
Table of Contents
Constants
- MENU_ITEM = 1
Properties
- $_items : array<string|int, mixed>
- The list of menu items.
- $_menuCache : mixed
- $_permissionedItems : array<string|int, mixed>
- The list of permissioned menu items.
- $_serializedElements : mixed
Methods
- build() : mixed
- We use this function to.
- buildAdminLinks() : mixed
- Build admin links.
- buildBreadcrumb() : array<string|int, mixed>
- Get the breadcrumb for a given path.
- buildReturnUrl() : mixed
- fillComponentIds() : mixed
- fillMenuValues() : mixed
- Fill menu values.
- get() : array<string|int, mixed>
- getAdminLinks() : array<string|int, mixed>|null
- Get admin links.
- getArrayForPathArgs() : mixed
- getReturnUrl() : array<string|int, mixed>
- isArrayTrue() : bool
- Is array true (whatever that means!).
- items() : array<string|int, mixed>
- This function defines information for various menu items.
- read() : mixed
- Read menu.
- readXML() : mixed
- store() : mixed
- This function recomputes menu from xml and populates civicrm_menu.
- xmlItems() : array<string|int, mixed>
- This function fetches the menu items from xml and xmlMenu hooks.
Constants
MENU_ITEM
public
mixed
MENU_ITEM
= 1
Properties
$_items
The list of menu items.
public
static array<string|int, mixed>
$_items
= \NULL
$_menuCache
public
static mixed
$_menuCache
= \NULL
$_permissionedItems
The list of permissioned menu items.
public
static array<string|int, mixed>
$_permissionedItems
= \NULL
$_serializedElements
public
static mixed
$_serializedElements
= ['access_arguments', 'access_callback', 'page_arguments', 'page_callback', 'breadcrumb']
Methods
build()
We use this function to.
public
static build(array<string|int, mixed> &$menu) : mixed
- Compute the breadcrumb
- Compute local tasks value if any
- Propagate access argument, access callback, page callback to the menu item
- Build the global navigation block
Parameters
- $menu : array<string|int, mixed>
buildAdminLinks()
Build admin links.
public
static buildAdminLinks(array<string|int, mixed> &$menu) : mixed
Parameters
- $menu : array<string|int, mixed>
buildBreadcrumb()
Get the breadcrumb for a given path.
public
static buildBreadcrumb(array<string|int, mixed> &$menu, string $path) : array<string|int, mixed>
Parameters
- $menu : array<string|int, mixed>
-
An array of all the menu items.
- $path : string
-
Path for which breadcrumb is to be build.
Return values
array<string|int, mixed> —The breadcrumb for this path
buildReturnUrl()
public
static buildReturnUrl(array<string|int, mixed> &$menu, string|int $path) : mixed
Parameters
- $menu : array<string|int, mixed>
- $path : string|int
fillComponentIds()
public
static fillComponentIds(mixed &$menu, mixed $path) : mixed
Parameters
- $menu : mixed
- $path : mixed
Tags
fillMenuValues()
Fill menu values.
public
static fillMenuValues(array<string|int, mixed> &$menu, string $path) : mixed
Parameters
- $menu : array<string|int, mixed>
- $path : string
Tags
get()
public
static get(string $path) : array<string|int, mixed>
Parameters
- $path : string
-
Path of menu item to retrieve.
Return values
array<string|int, mixed> —Menu entry array.
getAdminLinks()
Get admin links.
public
static getAdminLinks() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetArrayForPathArgs()
public
static getArrayForPathArgs(mixed $pathArgs) : mixed
Parameters
- $pathArgs : mixed
getReturnUrl()
public
static getReturnUrl(mixed &$menu, mixed $path) : array<string|int, mixed>
Parameters
- $menu : mixed
- $path : mixed
Return values
array<string|int, mixed>isArrayTrue()
Is array true (whatever that means!).
public
static isArrayTrue(array<string|int, mixed> $values) : bool
Parameters
- $values : array<string|int, mixed>
Return values
boolitems()
This function defines information for various menu items.
public
static & items([bool $fetchFromXML = FALSE ]) : array<string|int, mixed>
Parameters
- $fetchFromXML : bool = FALSE
-
Fetch the menu items from xml and not from cache.
Return values
array<string|int, mixed>read()
Read menu.
public
static read(string $name, array<string|int, mixed> &$menu) : mixed
Parameters
- $name : string
-
File name
- $menu : array<string|int, mixed>
-
An alterable list of menu items.
Tags
readXML()
public
static readXML(SimpleXMLElement $xml, array<string|int, mixed> &$menu) : mixed
Parameters
- $xml : SimpleXMLElement
-
An XML document defining a list of menu items.
- $menu : array<string|int, mixed>
-
An alterable list of menu items.
Tags
store()
This function recomputes menu from xml and populates civicrm_menu.
public
static store([bool $truncate = TRUE ]) : mixed
Parameters
- $truncate : bool = TRUE
xmlItems()
This function fetches the menu items from xml and xmlMenu hooks.
public
static & xmlItems([bool $fetchFromXML = FALSE ]) : array<string|int, mixed>
Parameters
- $fetchFromXML : bool = FALSE
-
Fetch the menu items from xml and not from cache.