<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
static $_links = NULL;
/**
- * we use desc to remind us what that column is, name is used in the tpl
+ * We use desc to remind us what that column is, name is used in the tpl
*
* @var array
* @static
static $_properties = array('contact_id', 'contact_type', 'display_name');
/**
- * formValues is the array returned by exportValues called on
+ * FormValues is the array returned by exportValues called on
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_formValues;
/**
- * params is the array in a value used by the search query creator
+ * Params is the array in a value used by the search query creator
*
* @var array
- * @access protected
*/
public $_params;
/**
- * represent the type of selector
+ * Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
protected $_query;
/**
- * the public visible fields to be shown to the user
+ * The public visible fields to be shown to the user
*
* @var array
- * @access protected
*/
protected $_fields;
$this->_search = new $className($formValues);
}
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
* - 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;
}
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;
$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);
* @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
*
* @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 ||
reference) $formValues submitted formValues
*
* @return array $qill which contains an array of strings
- * @access public
*/
public function getQILL() {
return NULL;
}
/**
- * 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);
/**
* @param $rows
*/
- function addActions(&$rows) {
+ public function addActions(&$rows) {
$links = self::links($this->_key);
$permissions = array(CRM_Core_Permission::getPermission());
/**
* @param $rows
*/
- function removeActions(&$rows) {
+ public function removeActions(&$rows) {
foreach ($rows as $rid => & $rValue) {
unset($rValue['action']);
}
}
}
-