當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。