Merge pull request #1162 from deepak-srivastava/search
authordeepak-srivastava <deepak.srivastava@webaccess.co.in>
Sun, 14 Jul 2013 14:11:17 +0000 (07:11 -0700)
committerdeepak-srivastava <deepak.srivastava@webaccess.co.in>
Sun, 14 Jul 2013 14:11:17 +0000 (07:11 -0700)
CRM-12940

1  2 
CRM/Utils/Hook.php

index d352bd8f8b88de0e431a9c6ab5c8dd1586cfb50c,97888baa91744a1decae377a64d8446e5701ad98..e7cb5189ac0aafa33ffdefef559858295f3f4991
@@@ -1295,21 -1283,17 +1295,32 @@@ abstract class CRM_Utils_Hook 
     * @return void
     */
    static function searchProfile($name) {
 -    return self::singleton()->invoke(1, $name, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_searchProfile');
 +    return self::singleton()->invoke(1, $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
 +      self::$_nullObject, 'civicrm_searchProfile');
 +  }
 +
 +  /**
 +   * This hook is called before encoding data in barcode
 +   *
 +   * @param array  $data associated array of values available for encoding
 +   * @param string $type type of barcode, classic barcode or QRcode
 +   * @param string $context where this hooks is invoked.
 +   *
 +   * @return void
 +   */
 +  static function alterBarcode( &$data, $type = 'barcode', $context = 'name_badge' ) {
 +    return self::singleton()->invoke(3, $data, $type, $context, self::$_nullObject,
 +      self::$_nullObject, 'civicrm_alterBarcode');
    }
+   /**
+    * This hook is called while building the core search query, 
+    * so hook implementers can provide their own query objects which alters/extends core search.
+    *
+    * @param Array $queryObjects
+    * @return void
+    */
+   static function queryObjects(&$queryObjects) {
+     return self::singleton()->invoke(1, $queryObjects, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_queryObjects');
+   }
  }