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


PHP CRM_Core_Form::caseInfo方法代码示例

本文整理汇总了PHP中CRM_Core_Form::caseInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Form::caseInfo方法的具体用法?PHP CRM_Core_Form::caseInfo怎么用?PHP CRM_Core_Form::caseInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Core_Form的用法示例。


在下文中一共展示了CRM_Core_Form::caseInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCaseReport

 /**
  * @param int $clientID
  * @param int $caseID
  * @param string $activitySetName
  * @param array $params
  * @param CRM_Core_Form $form
  *
  * @return mixed
  */
 public static function getCaseReport($clientID, $caseID, $activitySetName, $params, $form)
 {
     $template = CRM_Core_Smarty::singleton();
     $template->assign('caseId', $caseID);
     $template->assign('clientID', $clientID);
     $template->assign('activitySetName', $activitySetName);
     if (!empty($params['is_redact'])) {
         $form->_isRedact = TRUE;
         $template->assign('_isRedact', 'true');
     } else {
         $form->_isRedact = FALSE;
         $template->assign('_isRedact', 'false');
     }
     // first get all case information
     $case = $form->caseInfo($clientID, $caseID);
     $template->assign_by_ref('case', $case);
     if ($params['include_activities'] == 1) {
         $template->assign('includeActivities', 'All');
     } else {
         $template->assign('includeActivities', 'Missing activities only');
     }
     $xml = $form->retrieve($case['caseTypeName']);
     $activitySetNames = CRM_Case_XMLProcessor_Process::activitySets($xml->ActivitySets);
     $pageTitle = CRM_Utils_Array::value($activitySetName, $activitySetNames);
     $template->assign('pageTitle', $pageTitle);
     if ($activitySetName) {
         $activityTypes = $form->getActivityTypes($xml, $activitySetName);
     } else {
         $activityTypes = CRM_Case_XMLProcessor::allActivityTypes();
     }
     if (!$activityTypes) {
         return FALSE;
     }
     // next get activity set Information
     $activitySet = array('label' => $form->getActivitySetLabel($xml, $activitySetName), 'includeActivities' => 'All', 'redact' => 'false');
     $template->assign_by_ref('activitySet', $activitySet);
     //now collect all the information about activities
     $activities = array();
     $form->getActivities($clientID, $caseID, $activityTypes, $activities);
     $template->assign_by_ref('activities', $activities);
     // now run the template
     $contents = $template->fetch('CRM/Case/XMLProcessor/Report.tpl');
     return $contents;
 }
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:53,代码来源:Report.php


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