Merge pull request #5446 from atif-shaikh/CRM-14105
[civicrm-core.git] / CRM / Core / Menu.php
index 8338850db70ab1e638f1399d4542423c0bb7ad73..02a288955259ca7f7ab574f56269051453891239 100644 (file)
@@ -42,14 +42,14 @@ require_once 'CRM/Core/I18n.php';
 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
    */
@@ -67,7 +67,7 @@ class CRM_Core_Menu {
   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.
@@ -126,9 +126,12 @@ class CRM_Core_Menu {
         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, ';')
           ) {
@@ -159,7 +162,7 @@ class CRM_Core_Menu {
   }
 
   /**
-   * 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.
@@ -235,7 +238,7 @@ class CRM_Core_Menu {
   }
 
   /**
-   * We use this function to
+   * We use this function to.
    *
    * 1. Compute the breadcrumb
    * 2. Compute local tasks value if any
@@ -259,7 +262,7 @@ class CRM_Core_Menu {
   }
 
   /**
-   * 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) {