<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
* @param $formValues
*/
- function __construct(&$formValues) {
+ public function __construct(&$formValues) {
$this->_formValues = $formValues;
$this->_permissionedComponent = 'CiviContribute';
$this->_columns = array(
- ts('Contact Id') => 'contact_id',
+ ts('Contact ID') => 'contact_id',
ts('Name') => 'display_name',
- ts('Donation Count') => 'donation_count',
- ts('Donation Amount') => 'donation_amount',
+ ts('Contribution Count') => 'donation_count',
+ ts('Contribution Amount') => 'donation_amount',
);
$this->_amounts = array('min_amount_1' => ts('Min Amount One'),
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
- function buildForm(&$form) {
+ public function buildForm(&$form) {
foreach ($this->_amounts as $name => $title) {
$form->add('text',
/**
* @return mixed
*/
- function count() {
+ public function count() {
$sql = $this->all();
$dao = CRM_Core_DAO::executeQuery($sql);
*
* @return string
*/
- function contactIDs($offset = 0, $rowcount = 0, $sort = NULL) {
+ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL) {
return $this->all($offset, $rowcount, $sort, FALSE, TRUE);
}
/**
* @return string
*/
- function select() {
+ public function select() {
if (!empty($this->start_date_2) || !empty($this->end_date_2)) {
return "
sum(contrib_1.total_amount) + sum(contrib_2.total_amount) AS donation_amount,
/**
* @return null|string
*/
- function from() {
+ public function from() {
$from = NULL;
if (!empty($this->start_date_2) || !empty($this->end_date_2)) {
$from .= " LEFT JOIN civicrm_contribution contrib_2 ON contrib_2.contact_id = contact_a.id ";
*
* @return string
*/
- function where($includeContactIDs = FALSE) {
+ public function where($includeContactIDs = FALSE) {
$clauses = array();
if (!empty($this->start_date_1)) {
*
* @return string
*/
- function having($includeContactIDs = FALSE) {
+ public function having($includeContactIDs = FALSE) {
$clauses = array();
$min = CRM_Utils_Array::value('min_amount', $this->_formValues);
if ($min) {
/**
* @return array
*/
- function &columns() {
+ public function &columns() {
return $this->_columns;
}
/**
* @return string
*/
- function templateFile() {
+ public function templateFile() {
return 'CRM/Contact/Form/Search/Custom/ContribSYBNT.tpl';
}
/**
* @return null
*/
- function summary() {
+ public function summary() {
return NULL;
}
/**
* @param $title
*/
- function setTitle($title) {
+ public function setTitle($title) {
if ($title) {
CRM_Utils_System::setTitle($title);
}
}
}
}
-