X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FSelector%2FCustom.php;h=1bd4f4c1bc99d3f94f3067553db5afb05be05b50;hb=ce80b209ca04900e29af61f2c9b935af7d64fe67;hp=afaa3f82e9e8bdc7406fc0447b13a88f2e0a82de;hpb=a335f6b228626e3e1b2f1549c8ddcbb9232b3c6b;p=civicrm-core.git diff --git a/CRM/Contact/Selector/Custom.php b/CRM/Contact/Selector/Custom.php index afaa3f82e9..1bd4f4c1bc 100644 --- a/CRM/Contact/Selector/Custom.php +++ b/CRM/Contact/Selector/Custom.php @@ -1,7 +1,7 @@ _customSearchClass = $customSearchClass; $this->_formValues = $formValues; @@ -143,10 +141,10 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { if (!$ext->isExtensionKey($customSearchClass)) { if ($ext->isExtensionClass($customSearchClass)) { $customSearchFile = $ext->classToPath($customSearchClass); - require_once ($customSearchFile); + require_once $customSearchFile; } else { - require_once (str_replace('_', DIRECTORY_SEPARATOR, $customSearchClass) . '.php'); + require_once str_replace('_', DIRECTORY_SEPARATOR, $customSearchClass) . '.php'; } $this->_search = new $customSearchClass( $formValues ); } @@ -166,10 +164,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; @@ -212,9 +209,8 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { * @param $action * @param array $params * - * @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; @@ -227,13 +223,14 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { * 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) + * @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); @@ -262,24 +259,28 @@ 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 * - * @param enum $action the action being performed - * @param int $offset the row number to start from - * @param int $rowCount the number of rows to return - * @param string $sort the sql string that describes the sort order - * @param enum $output what should the result set include (web/email/csv) + * @param enum $action + * The action being performed. + * @param int $offset + * The row number to start from. + * @param int $rowCount + * The number of rows to return. + * @param string $sort + * The sql string that describes the sort order. + * @param enum $output + * What should the result set include (web/email/csv). * * @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 || @@ -359,8 +360,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { } if ($image) { - $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($dao->contact_sub_type ? - $dao->contact_sub_type : $dao->contact_type, FALSE, $contactID + $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($dao->contact_sub_type ? $dao->contact_sub_type : $dao->contact_type, FALSE, $contactID ); } $rows[] = $row; @@ -376,11 +376,10 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { * Given the current formValues, gets the query in local * language * - * @param array( - reference) $formValues submitted formValues + * @param array( + reference) $formValues submitted formValues * * @return array $qill which contains an array of strings - * @access public */ public function getQILL() { return NULL; @@ -396,18 +395,19 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { /** * Name of export file. * - * @param string $output type of output + * @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; } @@ -420,7 +420,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { * * @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); @@ -430,7 +430,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()); @@ -455,10 +455,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']); } } } -