Merge pull request #4725 from rohankatkar/Tests
[civicrm-core.git] / CRM / Contact / BAO / Query / Hook.php
index 22195327de79ee2544435e2ea470fb07260896d6..c64e39e70211e9d38e269ccb0f4ed716e766be5a 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -44,7 +44,7 @@ class CRM_Contact_BAO_Query_Hook {
   protected $_queryObjects = NULL;
 
   /**
-   * singleton function used to manage this object
+   * Singleton function used to manage this object
    *
    * @return object
    * @static
@@ -71,6 +71,9 @@ class CRM_Contact_BAO_Query_Hook {
     return $this->_queryObjects;
   }
 
+  /**
+   * @return array
+   */
   public function &getFields() {
     $extFields = array();
     foreach (self::getSearchQueryObjects() as $obj) {
@@ -80,18 +83,33 @@ class CRM_Contact_BAO_Query_Hook {
     return $extFields;
   }
 
+  /**
+   * @param $apiEntities
+   * @param $fieldOptions
+   */
   public function alterSearchBuilderOptions(&$apiEntities, &$fieldOptions) {
     foreach (self::getSearchQueryObjects() as $obj) {
       $obj->alterSearchBuilderOptions($apiEntities, $fieldOptions);
     }
   }
 
+  /**
+   * @param $query
+   * @param string $fnName
+   */
   public function alterSearchQuery(&$query, $fnName) {
     foreach (self::getSearchQueryObjects() as $obj) {
       $obj->$fnName($query);
     }
   }
 
+  /**
+   * @param string $fieldName
+   * @param $mode
+   * @param $side
+   *
+   * @return string
+   */
   public function buildSearchfrom($fieldName, $mode, $side) {
     $from = '';
     foreach (self::getSearchQueryObjects() as $obj) {
@@ -100,30 +118,47 @@ class CRM_Contact_BAO_Query_Hook {
     return $from;
   }
 
+  /**
+   * @param $tables
+   */
   public function setTableDependency(&$tables) {
     foreach (self::getSearchQueryObjects() as $obj) {
       $obj->setTableDependency($tables);
     }
   }
 
+  /**
+   * @param $panes
+   */
   public function registerAdvancedSearchPane(&$panes) {
     foreach (self::getSearchQueryObjects() as $obj) {
       $obj->registerAdvancedSearchPane($panes);
     }
   }
 
+  /**
+   * @param $panes
+   */
   public function getPanesMapper(&$panes) {
     foreach (self::getSearchQueryObjects() as $obj) {
       $obj->getPanesMapper($panes);
     }
   }
 
+  /**
+   * @param CRM_Core_Form $form
+   * @param $type
+   */
   public function buildAdvancedSearchPaneForm(&$form, $type) {
     foreach (self::getSearchQueryObjects() as $obj) {
       $obj->buildAdvancedSearchPaneForm($form, $type);
     }
   }
 
+  /**
+   * @param $paneTemplatePathArray
+   * @param $type
+   */
   public function setAdvancedSearchPaneTemplatePath(&$paneTemplatePathArray, $type) {
     foreach (self::getSearchQueryObjects() as $obj) {
       $obj->setAdvancedSearchPaneTemplatePath($paneTemplatePathArray, $type);