Merge pull request #4314 from cividesk/CRM-13227
[civicrm-core.git] / CRM / Member / Selector / Search.php
index 4a55b312395a54364c72ec4799832ba3d113e9af..9e21b4cb4daa4d0ed15802dba7fbfd1fd3721596 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$
  *
  */
@@ -137,15 +137,18 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C
   /**
    * Class constructor
    *
-   * @param array   $queryParams array of parameters for query
-   * @param int     $action - action of search basic or advanced.
-   * @param string  $memberClause if the caller wants to further restrict the search (used in memberships)
+   * @param array $queryParams array of parameters for query
+   * @param \const|int $action - action of search basic or advanced.
+   * @param string $memberClause if the caller wants to further restrict the search (used in memberships)
    * @param boolean $single are we dealing only with one contact?
-   * @param int     $limit  how many memberships do we want returned
+   * @param int $limit how many memberships do we want returned
    *
-   * @return CRM_Contact_Selector
-   * @access public
-   */ function __construct(&$queryParams,
+   * @param string $context
+   *
+   * @return \CRM_Member_Selector_Search
+  @access public
+   */
+  function __construct(&$queryParams,
     $action       = CRM_Core_Action::NONE,
     $memberClause = NULL,
     $single       = FALSE,
@@ -183,9 +186,15 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C
    * - View
    * - Edit
    *
+   * @param string $status
+   * @param null $isPaymentProcessor
+   * @param null $accessContribution
+   * @param null $qfKey
+   * @param null $context
+   * @param bool $isCancelSupported
+   *
    * @return array
    * @access public
-   *
    */
   static
   function &links($status = 'all',
@@ -268,7 +277,9 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C
   /**
    * getter for array of the parameters required for creating pager.
    *
-   * @param
+   * @param $action
+   * @param $params
+   * @internal param $
    * @access public
    */
   function getPagerParams($action, &$params) {
@@ -466,7 +477,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C
       self::$_columnHeaders = array(
         array(
           'name' => ts('Type'),
-          'sort' => 'membership_type_id',
+          'sort' => 'membership_type',
           'direction' => CRM_Utils_Sort::DONTCARE,
         ),
         array('name' => ts('Member Since'),
@@ -490,7 +501,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C
         ),
         array(
           'name' => ts('Status'),
-          'sort' => 'status_id',
+          'sort' => 'membership_status',
           'direction' => CRM_Utils_Sort::DONTCARE,
         ),
         array(
@@ -514,10 +525,16 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C
     return self::$_columnHeaders;
   }
 
+  /**
+   * @return mixed
+   */
   function alphabetQuery() {
     return $this->_query->searchQuery(NULL, NULL, NULL, FALSE, FALSE, TRUE);
   }
 
+  /**
+   * @return string
+   */
   function &getQuery() {
     return $this->_query;
   }