+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* This file contains the various menus of the CiviCRM module
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Core_Menu {
/**
- * The list of menu items
+ * The list of menu items.
*
* @var array
*/
static $_items = NULL;
/**
- * The list of permissioned menu items
+ * The list of permissioned menu items.
*
* @var array
*/
const MENU_ITEM = 1;
/**
- * This function fetches the menu items from xml and xmlMenu hooks
+ * This function fetches the menu items from xml and xmlMenu hooks.
*
* @param boolen $fetchFromXML
* Fetch the menu items from xml and not from cache.
if (strpos($key, '_callback') &&
strpos($value, '::')
) {
+ // FIXME Remove the rewrite at this level. Instead, change downstream call_user_func*($value)
+ // to call_user_func*(Civi\Core\Resolver::singleton()->get($value)).
$value = explode('::', $value);
}
elseif ($key == 'access_arguments') {
+ // FIXME Move the permission parser to its own class (or *maybe* CRM_Core_Permission).
if (strpos($value, ',') ||
strpos($value, ';')
) {
}
/**
- * This function defines information for various menu items
+ * This function defines information for various menu items.
*
* @param boolen $fetchFromXML
* Fetch the menu items from xml and not from cache.
}
/**
- * We use this function to
+ * We use this function to.
*
* 1. Compute the breadcrumb
* 2. Compute local tasks value if any
}
/**
- * This function recomputes menu from xml and populates civicrm_menu
+ * This function recomputes menu from xml and populates civicrm_menu.
* @param bool $truncate
*/
public static function store($truncate = TRUE) {
while ($newPath = array_shift($pathElements)) {
$currentPath = $currentPath ? ($currentPath . '/' . $newPath) : $newPath;
- // when we come accross breadcrumb which involves ids,
+ // when we come across breadcrumb which involves ids,
// we should skip now and later on append dynamically.
if (isset($menu[$currentPath]['skipBreadcrumb'])) {
continue;