本文整理汇总了PHP中CRM_Report_Utils_Report::add2group方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Report_Utils_Report::add2group方法的具体用法?PHP CRM_Report_Utils_Report::add2group怎么用?PHP CRM_Report_Utils_Report::add2group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Report_Utils_Report
的用法示例。
在下文中一共展示了CRM_Report_Utils_Report::add2group方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: endPostProcess
function endPostProcess(&$rows = null)
{
if ($this->_outputMode == 'print' || $this->_outputMode == 'pdf' || $this->_sendmail) {
$templateFile = parent::getTemplateFileName();
$content = $this->_formValues['report_header'] . CRM_Core_Form::$_template->fetch($templateFile) . $this->_formValues['report_footer'];
if ($this->_sendmail) {
if (CRM_Report_Utils_Report::mailReport($content, $this->_id, $this->_outputMode)) {
CRM_Core_Session::setStatus(ts("Report mail has been sent."));
} else {
CRM_Core_Session::setStatus(ts("Report mail could not be sent."));
}
if ($this->get('instanceId')) {
CRM_Utils_System::civiExit();
}
CRM_Utils_System::redirect(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1'));
} else {
if ($this->_outputMode == 'print') {
echo $content;
} else {
if ($chartType = CRM_Utils_Array::value('charts', $this->_params)) {
$config =& CRM_Core_Config::singleton();
//get chart image name
$chartImg = $chartType . '_' . $this->_id . '.png';
//get image url path
$uploadUrl = str_replace('persist/contribute', 'upload/openFlashChart', $config->imageUploadURL);
$uploadUrl .= $chartImg;
//get image doc path to overwrite
$uploadImg = $config->uploadDir . 'openFlashChart/' . $chartImg;
//Load the image
$chart = imagecreatefrompng($uploadUrl);
//convert it into formattd png
header('Content-type: image/png');
//overwrite with same image
imagepng($chart, $uploadImg);
//delete the object
imagedestroy($chart);
}
require_once 'CRM/Utils/PDF/Utils.php';
CRM_Utils_PDF_Utils::html2pdf($content, "CiviReport.pdf");
}
}
CRM_Utils_System::civiExit();
} else {
if ($this->_outputMode == 'csv') {
CRM_Report_Utils_Report::export2csv($this, $rows);
} else {
if ($this->_outputMode == 'group') {
$group = $this->_params['groups'];
CRM_Report_Utils_Report::add2group($this, $group);
} else {
if ($this->_instanceButtonName == $this->controller->getButtonName()) {
require_once 'CRM/Report/Form/Instance.php';
CRM_Report_Form_Instance::postProcess($this);
}
}
}
}
}
示例2: endPostProcess
function endPostProcess(&$rows = null)
{
if ($this->_outputMode == 'print' || $this->_outputMode == 'pdf' || $this->_sendmail) {
$templateFile = parent::getTemplateFileName();
$content = $this->_formValues['report_header'] . CRM_Core_Form::$_template->fetch($templateFile) . $this->_formValues['report_footer'];
if ($this->_sendmail) {
if (CRM_Report_Utils_Report::mailReport($content, $this->_id, $this->_outputMode)) {
CRM_Core_Session::setStatus(ts("Report mail has been sent."));
} else {
CRM_Core_Session::setStatus(ts("Report mail could not be sent."));
}
if ($this->get('instanceId')) {
exit;
}
CRM_Utils_System::redirect(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1'));
} else {
if ($this->_outputMode == 'print') {
echo $content;
} else {
require_once 'CRM/Utils/PDF/Utils.php';
CRM_Utils_PDF_Utils::html2pdf($content, "CiviReport.pdf");
}
}
exit;
} else {
if ($this->_outputMode == 'csv') {
CRM_Report_Utils_Report::export2csv($this, $rows);
} else {
if ($this->_outputMode == 'group') {
$group = $this->_params['groups'];
CRM_Report_Utils_Report::add2group($this, $group);
} else {
if ($this->_instanceButtonName == $this->controller->getButtonName()) {
require_once 'CRM/Report/Form/Instance.php';
CRM_Report_Form_Instance::postProcess($this);
}
}
}
}
}