Merge pull request #10615 from mepps/CRM-20828
[civicrm-core.git] / CRM / Core / Menu.php
index e100d996c9e2187758738e52a90dd7f0ffcd0a0b..7ffbeb64068d998e00a5d74821a079526a490ea6 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -29,7 +29,7 @@
  * This file contains the various menus of the CiviCRM module
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
  */
 
 require_once 'CRM/Core/I18n.php';
@@ -94,6 +94,8 @@ class CRM_Core_Menu {
       foreach ($files as $file) {
         self::read($file, self::$_items);
       }
+
+      CRM_Utils_Hook::alterMenu(self::$_items);
     }
 
     return self::$_items;
@@ -622,9 +624,11 @@ class CRM_Core_Menu {
   }
 
   /**
-   * @param $path
+   * @param $path string
+   *   Path of menu item to retrieve.
    *
-   * @return null
+   * @return array
+   *   Menu entry array.
    */
   public static function get($path) {
     // return null if menu rebuild