public $_drilldownReport = array('contribute/detail' => 'Link to Detail Report');
/**
- *
*/
- function __construct() {
+ public function __construct() {
$yearsInPast = 10;
$yearsInFuture = 1;
$date = CRM_Core_SelectValues::date('custom', NULL, $yearsInPast, $yearsInFuture);
parent::__construct();
}
- function preProcess() {
+ public function preProcess() {
parent::preProcess();
}
- function select() {
+ public function select() {
$select = array();
$this->_columnHeaders = array();
$current_year = $this->_params['yid_value'];
$this->_select = "SELECT " . implode(', ', $select) . " ";
}
- function from() {
+ public function from() {
$this->_from = "
FROM civicrm_contribution {$this->_aliases['civicrm_contribution']}
$this->addAddressFromClause();
}
- function where() {
+ public function where() {
$this->_statusClause = "";
$clauses = array($this->_aliases['civicrm_contribution'] . '.is_test = 0');
foreach ($this->_columns as $tableName => $table) {
self::fiscalYearOffset('contri.receive_date') .
" = {$this->_params['yid_value']} AND contri.is_test = 0 )";
}
- elseif (CRM_Utils_Array::value('type', $field) &
- CRM_Utils_Type::T_DATE
+ elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
}
}
- function groupBy() {
+ public function groupBy() {
$this->assign('chartSupported', TRUE);
$this->_groupBy =
"Group BY {$this->_aliases['civicrm_contribution']}.contact_id, " .
*
* @return array
*/
- function statistics(&$rows) {
+ public function statistics(&$rows) {
$statistics = parent::statistics($rows);
if (!empty($rows)) {
return $statistics;
}
- function postProcess() {
+ public function postProcess() {
// get ready with post process params
$this->beginPostProcess();
/**
* @param $rows
*/
- function buildChart(&$rows) {
+ public function buildChart(&$rows) {
$graphRows = array();
$count = 0;
$current_year = $this->_params['yid_value'];
/**
* @param $rows
*/
- function alterDisplay(&$rows) {
+ public function alterDisplay(&$rows) {
// custom code to alter rows
$entryFound = FALSE;
}
}
- // Override "This Year" $op options
/**
+ * Override "This Year" $op options
* @param string $type
* @param null $fieldName
*
* @return array
*/
- function getOperationPair($type = "string", $fieldName = NULL) {
+ public function getOperationPair($type = "string", $fieldName = NULL) {
if ($fieldName == 'yid') {
return array(
'calendar' => ts('Is Calendar Year'),
- 'fiscal' => ts('Fiscal Year Starting')
+ 'fiscal' => ts('Fiscal Year Starting'),
);
}
return parent::getOperationPair($type, $fieldName);
}
}
-