Merge pull request #8092 from eileenmcnaughton/CRM-18368
[civicrm-core.git] / CRM / Utils / Hook.php
index 8a95d958adcf0a1e6647d541e0787df9c2c0968a..4b3770b6cd0c5566c37559d4f1c0a9d1ad3627fc 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CiviCRM_Hook
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
  */
 abstract class CRM_Utils_Hook {
 
@@ -489,6 +489,19 @@ abstract class CRM_Utils_Hook {
       ->invoke(5, $type, $contactID, $tableName, $allGroups, $currentGroups, self::$_nullObject, 'civicrm_aclGroup');
   }
 
+  /**
+   * @param string|CRM_Core_DAO $entity
+   * @param array $clauses
+   * @return mixed
+   */
+  public static function selectWhereClause($entity, &$clauses) {
+    $entityName = is_object($entity) ? _civicrm_api_get_entity_name_from_dao($entity) : $entity;
+    return self::singleton()->invoke(2, $entityName, $clauses,
+      self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,
+      'civicrm_selectWhereClause'
+    );
+  }
+
   /**
    * This hook is called when building the menu table.
    *
@@ -1571,14 +1584,13 @@ abstract class CRM_Utils_Hook {
   /**
    * This hook is called when a CiviMail mailing has completed
    *
-   * @param array $report
-   *   Output from: CRM_Mailing_BAO_Mailing::report()
-   *   Includes details about the mailing, including stats to date, jobs, etc.
+   * @param int $mailingId
+   *   Mailing ID
    *
    * @return mixed
    */
-  public static function postMailing($report) {
-    return self::singleton()->invoke(1, $report,
+  public static function postMailing($mailingId) {
+    return self::singleton()->invoke(1, $mailingId,
       self::$_nullObject, self::$_nullObject,
       self::$_nullObject, self::$_nullObject, self::$_nullObject,
       'civicrm_postMailing'
@@ -2083,4 +2095,15 @@ abstract class CRM_Utils_Hook {
     );
   }
 
+  /**
+   * This hook is called for bypass a few civicrm urls from IDS check
+   * @param array $skip list of civicrm url;
+   */
+  public static function idsException(&$skip) {
+    return self::singleton()->invoke(1, $skip, self::$_nullObject,
+      self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,
+      'civicrm_idsException'
+    );
+  }
+
 }