Fix removeNullContactTokens compatibility with custom tokens
[civicrm-core.git] / CRM / Utils / Hook.php
index 2595679938fcdc3a6a06ca56d7168363c22feb2d..6b70eadf012ea1636ca10407621d9b3eac810e43 100644 (file)
@@ -835,6 +835,21 @@ abstract class CRM_Utils_Hook {
     );
   }
 
+  /**
+   * This hook allows modification of the admin panels
+   *
+   * @param array $panels
+   *   Associated array of admin panels
+   *
+   * @return mixed
+   */
+  public static function alterAdminPanel(&$panels) {
+    return self::singleton()->invoke(array('panels'), $panels,
+      self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,
+      'civicrm_alterAdminPanel'
+    );
+  }
+
   /**
    * This hook is called when sending an email / printing labels to get the values for all the
    * tokens returned by the 'tokens' hook