当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Report_Form::endPostProcess方法代码示例

本文整理汇总了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();
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:42,代码来源:Summary.php

示例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();
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:37,代码来源:Income.php

示例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);
 }
开发者ID:JoeMurray,项目名称:civihr,代码行数:33,代码来源:HRAbsenceCalendar.php


注:本文中的CRM_Report_Form::endPostProcess方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。