+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
public $_queryParams;
/**
- * Represent the type of selector
+ * Represent the type of selector.
*
* @var int
*/
protected $_action;
/**
- * The additional clause that we restrict the search with
+ * The additional clause that we restrict the search with.
*
* @var string
*/
protected $_mailingClause = NULL;
/**
- * The query object
+ * The query object.
*
* @var string
*/
protected $_query;
/**
- * Class constructor
+ * Class constructor.
*
* @param array $queryParams
* Array of parameters for query.
* @param null $compContext
*
* @return \CRM_Mailing_Selector_Search
- @access public
*/
- function __construct(
+ public function __construct(
&$queryParams,
$action = CRM_Core_Action::NONE,
$mailingClause = NULL,
// submitted form values
$this->_queryParams = &$queryParams;
- $this->_single = $single;
- $this->_limit = $limit;
- $this->_context = $context;
+ $this->_single = $single;
+ $this->_limit = $limit;
+ $this->_context = $context;
$this->_compContext = $compContext;
$this->_mailingClause = $mailingClause;
* - Edit
*
* @return array
- *
*/
public static function &links() {
if (!(self::$_links)) {
$searchContext = ($context) ? "&context=$context" : NULL;
self::$_links = array(
- CRM_Core_Action::VIEW => array(
- 'name' => ts('View'),
- 'url' => 'civicrm/contact/view',
- 'qs' => "reset=1&cid=%%cid%%{$searchContext}{$extraParams}",
- 'title' => ts('View Contact Details'),
- ),
- CRM_Core_Action::UPDATE => array(
- 'name' => ts('Edit'),
- 'url' => 'civicrm/contact/add',
- 'qs' => "reset=1&action=update&cid=%%cid%%{$searchContext}{$extraParams}",
- 'title' => ts('Edit Contact Details'),
- ),
- CRM_Core_Action::DELETE => array(
- 'name' => ts('Delete'),
- 'url' => 'civicrm/contact/view/delete',
- 'qs' => "reset=1&delete=1&cid=%%cid%%{$searchContext}{$extraParams}",
- 'title' => ts('Delete Contact'),
- ),
+ CRM_Core_Action::VIEW => array(
+ 'name' => ts('View'),
+ 'url' => 'civicrm/contact/view',
+ 'qs' => "reset=1&cid=%%cid%%{$searchContext}{$extraParams}",
+ 'title' => ts('View Contact Details'),
+ ),
+ CRM_Core_Action::UPDATE => array(
+ 'name' => ts('Edit'),
+ 'url' => 'civicrm/contact/add',
+ 'qs' => "reset=1&action=update&cid=%%cid%%{$searchContext}{$extraParams}",
+ 'title' => ts('Edit Contact Details'),
+ ),
+ CRM_Core_Action::DELETE => array(
+ 'name' => ts('Delete'),
+ 'url' => 'civicrm/contact/view/delete',
+ 'qs' => "reset=1&delete=1&cid=%%cid%%{$searchContext}{$extraParams}",
+ 'title' => ts('Delete Contact'),
+ ),
);
}
return self::$_links;
*
* @param $action
* @param array $params
- *
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Mailing Recipient') . ' %%StatusMessage%%';
*
* @param
*
- * @return int Total number of rows
+ * @return int
+ * Total number of rows
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
}
/**
- * Returns all the rows in the given offset and rowCount
+ * Returns all the rows in the given offset and rowCount.
*
- * @param enum $action
+ * @param string $action
* The action being performed.
* @param int $offset
* The row number to start from.
* The number of rows to return.
* @param string $sort
* The sql string that describes the sort order.
- * @param enum $output
+ * @param string $output
* What should the result set include (web/email/csv).
*
- * @return int the total number of rows for this action
+ * @return int
+ * the total number of rows for this action
*/
public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {
$result = $this->_query->searchQuery($offset, $rowCount, $sort,
}
/**
- * @return array $qill which contains an array of strings
+ * @inheritDoc
*/
-
- // the current internationalisation is bad, but should more or less work
- // for most of "European" languages
public function getQILL() {
return $this->_query->qill();
}
*
* @param string $action
* The action being performed.
- * @param enum $output
+ * @param string $output
* What should the result set include (web/email/csv).
*
- * @return array the column headers that need to be displayed
+ * @return array
+ * the column headers that need to be displayed
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
* @param string $output
* Type of output.
*
- * @return string name of the file
+ * @return string
+ * name of the file
*/
public function getExportFileName($output = 'csv') {
return ts('CiviCRM Mailing Search');
}
+
}