本文整理汇总了PHP中CRM_Report_Form::endPostProcess方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Report_Form::endPostProcess方法的具体用法?PHP CRM_Report_Form::endPostProcess怎么用?PHP CRM_Report_Form::endPostProcess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Report_Form
的用法示例。
在下文中一共展示了CRM_Report_Form::endPostProcess方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
function postProcess()
{
$this->_params = $this->controller->exportValues($this->_name);
if (empty($this->_params) && $this->_force) {
$this->_params = $this->_formValues;
}
$this->_formValues = $this->_params;
$this->processReportMode();
$this->select();
$this->from();
$this->where();
$this->groupBy();
$sql = "{$this->_select} {$this->_from} {$this->_where} {$this->_groupBy}";
$dao = CRM_Core_DAO::executeQuery($sql);
$rows = $graphRows = array();
$count = 0;
while ($dao->fetch()) {
$row = array();
foreach ($this->_columnHeaders as $key => $value) {
$row[$key] = $dao->{$key};
}
if (!empty($this->_params['charts']) && $row['civicrm_contribution_receive_date_subtotal']) {
$graphRows['receive_date'][] = $row['civicrm_contribution_receive_date_start'];
$graphRows[$this->_interval][] = $row['civicrm_contribution_receive_date_interval'];
$graphRows['value'][] = $row['civicrm_contribution_total_amount_sum'];
$count++;
}
$rows[] = $row;
}
$this->formatDisplay($rows);
$this->assign_by_ref('columnHeaders', $this->_columnHeaders);
$this->assign_by_ref('rows', $rows);
$this->assign('statistics', $this->statistics($rows));
if (!empty($this->_params['charts'])) {
foreach (array('receive_date', $this->_interval, 'value') as $ignore) {
unset($graphRows[$ignore][$count - 1]);
}
// build chart.
CRM_Utils_OpenFlashChart::chart($graphRows, $this->_params['charts'], $this->_interval);
}
parent::endPostProcess();
}
示例2: postProcess
function postProcess()
{
$this->beginPostProcess();
$this->_setVariable = TRUE;
if (empty($this->_params['id_value'][0])) {
$this->_params['id_value'] = array();
$this->_setVariable = FALSE;
$events = CRM_Event_PseudoConstant::event(NULL, NULL, "is_template IS NULL OR is_template = 0");
if (empty($events)) {
return FALSE;
}
foreach ($events as $key => $dnt) {
$this->_params['id_value'][] = $key;
}
}
$this->_rowsFound = count($this->_params['id_value']);
//set pager and limit if output mode is html
if ($this->_outputMode == 'html') {
$this->limit();
$this->setPager();
$showEvents = array();
$count = 0;
$numRows = $this->_limit;
while ($count < self::ROW_COUNT_LIMIT) {
if (!isset($this->_params['id_value'][$numRows])) {
break;
}
$showEvents[] = $this->_params['id_value'][$numRows];
$count++;
$numRows++;
}
$this->buildEventReport($showEvents);
} else {
$this->buildEventReport($this->_params['id_value']);
}
parent::endPostProcess();
}
示例3: endPostProcess
function endPostProcess(&$rows = NULL)
{
$csvRows = array();
$count = 0;
foreach ($rows as $year => $yearlyRecord) {
foreach ($yearlyRecord as $month => $monthlyrecord) {
if (!array_key_exists('contacts', $monthlyrecord)) {
continue;
}
foreach ($monthlyrecord['contacts'] as $contact_id => $record) {
$csvRows[$count]['year'] = $year;
$csvRows[$count]['month'] = $monthlyrecord['month_name'];
$csvRows[$count]['contact_id'] = $contact_id;
$csvRows[$count]['individual'] = CRM_Contact_BAO_Contact::displayName($contact_id);
for ($i = 1; $i <= 31; $i++) {
$csvRows[$count]['day_' . $i] = "";
}
foreach ($record as $day => $dayRecord) {
if ($day == 'link') {
continue;
}
if (array_key_exists($dayRecord['activity_type_id'], $this->activityTypes)) {
$csvRows[$count]['day_' . $day] = $this->activityTypes[$dayRecord['activity_type_id']];
} else {
$csvRows[$count]['day_' . $day] = $dayRecord['activity_type_id'];
}
}
$count++;
}
}
}
parent::endPostProcess($csvRows);
}