Merge pull request #4725 from rohankatkar/Tests
[civicrm-core.git] / CRM / Contact / BAO / Query / Hook.php
index 733b6becc473e0acd8095f6c3ed42c391ba75072..c64e39e70211e9d38e269ccb0f4ed716e766be5a 100644 (file)
@@ -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);