X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FSelector%2FCustom.php;h=15fe2948022049ca040b14323a3fb9f38bd1460d;hb=335f816e058ff3be3068bf312306fa875cc6d489;hp=bb28ea8f7851a6439b9bd2aefb63566cf495c6ae;hpb=51daafaadd025703b2f8d6e3d27898e3768908f9;p=civicrm-core.git diff --git a/CRM/Contact/Selector/Custom.php b/CRM/Contact/Selector/Custom.php index bb28ea8f78..15fe294802 100644 --- a/CRM/Contact/Selector/Custom.php +++ b/CRM/Contact/Selector/Custom.php @@ -1,7 +1,7 @@ _search = new $className($formValues); } } - //end of constructor /** * This method returns the links that are given for each search row. @@ -167,10 +162,9 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { * - Edit * * @return array - * @access public * */ - static function &links() { + public static function &links() { list($key) = func_get_args(); $searchContext = "&context=custom"; $extraParams = ($key) ? "&key={$key}" : NULL; @@ -206,18 +200,15 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { } return self::$_links; } - //end of function /** - * getter for array of the parameters required for creating pager. + * Getter for array of the parameters required for creating pager. * * @param $action - * @param $params + * @param array $params * - * @internal param $ - * @access public */ - function getPagerParams($action, &$params) { + public function getPagerParams($action, &$params) { $params['status'] = ts('Contact %%StatusMessage%%'); $params['csvString'] = NULL; $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT; @@ -225,19 +216,17 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { $params['buttonTop'] = 'PagerTopButton'; $params['buttonBottom'] = 'PagerBottomButton'; } - //end of function /** - * returns the column headers as an array of tuples: + * Returns the column headers as an array of tuples: * (name, sortName (key to the sort array)) * * @param string $action the action being performed * @param enum $output what should the result set include (web/email/csv) * * @return array the column headers that need to be displayed - * @access public */ - function &getColumnHeaders($action = NULL, $output = NULL) { + public function &getColumnHeaders($action = NULL, $output = NULL) { $columns = $this->_search->columns(); if ($output == CRM_Core_Selector_Controller::EXPORT) { return array_keys($columns); @@ -266,14 +255,13 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { * @param * * @return int Total number of rows - * @access public */ - function getTotalCount($action) { + public function getTotalCount($action) { return $this->_search->count(); } /** - * returns all the rows in the given offset and rowCount + * Returns all the rows in the given offset and rowCount * * @param enum $action the action being performed * @param int $offset the row number to start from @@ -283,7 +271,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { * * @return int the total number of rows for this action */ - function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { + public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { $includeContactIDs = FALSE; if (($output == CRM_Core_Selector_Controller::EXPORT || @@ -384,7 +372,6 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { reference) $formValues submitted formValues * * @return array $qill which contains an array of strings - * @access public */ public function getQILL() { return NULL; @@ -398,33 +385,33 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { } /** - * name of export file. + * Name of export file. * * @param string $output type of output * * @return string name of the file */ - function getExportFileName($output = 'csv') { + public function getExportFileName($output = 'csv') { return ts('CiviCRM Custom Search'); } /** * @return null */ - function alphabetQuery() { + public function alphabetQuery() { return NULL; } /** - * @param $params + * @param array $params * @param $action - * @param $sortID + * @param int $sortID * @param null $displayRelationshipType * @param string $queryOperator * * @return Object */ - function &contactIDQuery($params, $action, $sortID, $displayRelationshipType = NULL, $queryOperator = 'AND') { + public function &contactIDQuery($params, $action, $sortID, $displayRelationshipType = NULL, $queryOperator = 'AND') { $params = array(); $sql = $this->_search->contactIDs($params); @@ -434,7 +421,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { /** * @param $rows */ - function addActions(&$rows) { + public function addActions(&$rows) { $links = self::links($this->_key); $permissions = array(CRM_Core_Permission::getPermission()); @@ -459,10 +446,9 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { /** * @param $rows */ - function removeActions(&$rows) { + public function removeActions(&$rows) { foreach ($rows as $rid => & $rValue) { unset($rValue['action']); } } } -