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


PHP CRM_Case_BAO_Case::getCasesSummary方法代码示例

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


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

示例1: preProcess

 /** 
  * Heart of the viewing process. The runner gets all the meta data for 
  * the contact and calls the appropriate type of page to view. 
  * 
  * @return void 
  * @access public 
  * 
  */
 function preProcess()
 {
     // Make sure case types have been configured for the component
     require_once 'CRM/Core/OptionGroup.php';
     $caseType = CRM_Core_OptionGroup::values('case_type');
     if (empty($caseType)) {
         $this->assign('notConfigured', 1);
         return;
     }
     $session =& CRM_Core_Session::singleton();
     $allCases = CRM_Utils_Request::retrieve('all', 'Positive', $session);
     CRM_Utils_System::setTitle(ts('CiviCase Dashboard'));
     $userID = $session->get('userID');
     if (!$allCases) {
         $this->assign('myCases', true);
     } else {
         $this->assign('myCases', false);
     }
     $this->assign('newClient', false);
     if (CRM_Core_Permission::check('add contacts')) {
         $this->assign('newClient', true);
     }
     require_once 'CRM/Case/BAO/Case.php';
     $summary = CRM_Case_BAO_Case::getCasesSummary($allCases, $userID);
     $upcoming = CRM_Case_BAO_Case::getCases($allCases, $userID, 'upcoming');
     $recent = CRM_Case_BAO_Case::getCases($allCases, $userID, 'recent');
     $this->assign('casesSummary', $summary);
     if (!empty($upcoming)) {
         $this->assign('upcomingCases', $upcoming);
     }
     if (!empty($recent)) {
         $this->assign('recentCases', $recent);
     }
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:42,代码来源:DashBoard.php

示例2: run

 /**
  * Case dashboard as dashlet
  *
  * @return void
  *
  * @access public
  */
 function run()
 {
     //check for civicase access.
     if (!CRM_Case_BAO_Case::accessCiviCase()) {
         CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
     }
     $session =& CRM_Core_Session::singleton();
     $userID = $session->get('userID');
     $summary = CRM_Case_BAO_Case::getCasesSummary(TRUE, $userID);
     if (!empty($summary)) {
         $this->assign('casesSummary', $summary);
     }
     return parent::run();
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:21,代码来源:CaseDashboard.php

示例3: preProcess

 /**
  * Heart of the viewing process.
  *
  * The runner gets all the meta data for the contact and calls the appropriate type of page to view.
  */
 public function preProcess()
 {
     //check for civicase access.
     if (!CRM_Case_BAO_Case::accessCiviCase()) {
         CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
     }
     //validate case configuration.
     $configured = CRM_Case_BAO_Case::isCaseConfigured();
     $this->assign('notConfigured', !$configured['configured']);
     $this->assign('allowToAddNewCase', $configured['allowToAddNewCase']);
     if (!$configured['configured']) {
         return;
     }
     $session = CRM_Core_Session::singleton();
     $allCases = CRM_Utils_Request::retrieve('all', 'Positive', $session);
     CRM_Utils_System::setTitle(ts('CiviCase Dashboard'));
     $userID = $session->get('userID');
     //validate access for all cases.
     if ($allCases && !CRM_Core_Permission::check('access all cases and activities')) {
         $allCases = FALSE;
         CRM_Core_Session::setStatus(ts('You are not authorized to access all cases and activities.'), ts('Sorry'), 'error');
     }
     if (!$allCases) {
         $this->assign('myCases', TRUE);
     } else {
         $this->assign('myCases', FALSE);
     }
     $this->assign('newClient', FALSE);
     if (CRM_Core_Permission::check('add contacts') && CRM_Core_Permission::check('access all cases and activities')) {
         $this->assign('newClient', TRUE);
     }
     $summary = CRM_Case_BAO_Case::getCasesSummary($allCases, $userID);
     $upcoming = CRM_Case_BAO_Case::getCases($allCases, $userID, 'upcoming');
     $recent = CRM_Case_BAO_Case::getCases($allCases, $userID, 'recent');
     foreach ($upcoming as $key => $value) {
         if (strtotime($value['case_scheduled_activity_date']) < time()) {
             $upcoming[$key]['activity_status'] = 'status-overdue';
         }
     }
     $this->assign('casesSummary', $summary);
     if (!empty($upcoming)) {
         $this->assign('upcomingCases', $upcoming);
     }
     if (!empty($recent)) {
         $this->assign('recentCases', $recent);
     }
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:52,代码来源:DashBoard.php

示例4: preProcess

 /** 
  * Heart of the viewing process. The runner gets all the meta data for 
  * the contact and calls the appropriate type of page to view. 
  * 
  * @return void 
  * @access public 
  * 
  */
 function preProcess()
 {
     //check for civicase access.
     if (!CRM_Case_BAO_Case::accessCiviCase()) {
         CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
     }
     //validate case configuration.
     require_once 'CRM/Case/BAO/Case.php';
     $configured = CRM_Case_BAO_Case::isCaseConfigured();
     $this->assign('notConfigured', !$configured['configured']);
     $this->assign('allowToAddNewCase', $configured['allowToAddNewCase']);
     if (!$configured['configured']) {
         return;
     }
     $session =& CRM_Core_Session::singleton();
     $allCases = CRM_Utils_Request::retrieve('all', 'Positive', $session);
     CRM_Utils_System::setTitle(ts('CiviCase Dashboard'));
     $userID = $session->get('userID');
     //validate access for all cases.
     if ($allCases && !CRM_Core_Permission::check('access all cases and activities')) {
         $allCases = false;
         CRM_Core_Session::setStatus(ts('You are not authorized to access all cases and activities.'));
     }
     if (!$allCases) {
         $this->assign('myCases', true);
     } else {
         $this->assign('myCases', false);
     }
     $this->assign('newClient', false);
     if (CRM_Core_Permission::check('add contacts') && CRM_Core_Permission::check('access all cases and activities')) {
         $this->assign('newClient', true);
     }
     require_once 'CRM/Case/BAO/Case.php';
     $summary = CRM_Case_BAO_Case::getCasesSummary($allCases, $userID);
     $upcoming = CRM_Case_BAO_Case::getCases($allCases, $userID, 'upcoming');
     $recent = CRM_Case_BAO_Case::getCases($allCases, $userID, 'recent');
     $this->assign('casesSummary', $summary);
     if (!empty($upcoming)) {
         $this->assign('upcomingCases', $upcoming);
     }
     if (!empty($recent)) {
         $this->assign('recentCases', $recent);
     }
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:52,代码来源:DashBoard.php

示例5: preProcess

 /**
  * Heart of the viewing process. The runner gets all the meta data for
  * the contact and calls the appropriate type of page to view.
  *
  * @return void
  * @access public
  *
  */
 function preProcess()
 {
     // js for changing activity status
     CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Case/Form/ActivityChangeStatus.js');
     //check for civicase access.
     if (!CRM_Case_BAO_Case::accessCiviCase()) {
         CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
     }
     //validate case configuration.
     $configured = CRM_Case_BAO_Case::isCaseConfigured();
     $this->assign('notConfigured', !$configured['configured']);
     $this->assign('allowToAddNewCase', $configured['allowToAddNewCase']);
     if (!$configured['configured']) {
         return;
     }
     $session = CRM_Core_Session::singleton();
     $allCases = CRM_Utils_Request::retrieve('all', 'Positive', $session);
     CRM_Utils_System::setTitle(ts('CiviCase Dashboard'));
     $userID = $session->get('userID');
     //validate access for all cases.
     if ($allCases && !CRM_Core_Permission::check('access all cases and activities')) {
         $allCases = FALSE;
         CRM_Core_Session::setStatus(ts('You are not authorized to access all cases and activities.'), ts('Sorry'), 'error');
     }
     if (!$allCases) {
         $this->assign('myCases', TRUE);
     } else {
         $this->assign('myCases', FALSE);
     }
     $this->assign('newClient', FALSE);
     if (CRM_Core_Permission::check('add contacts') && CRM_Core_Permission::check('access all cases and activities')) {
         $this->assign('newClient', TRUE);
     }
     $summary = CRM_Case_BAO_Case::getCasesSummary($allCases, $userID);
     $upcoming = CRM_Case_BAO_Case::getCases($allCases, $userID, 'upcoming');
     $recent = CRM_Case_BAO_Case::getCases($allCases, $userID, 'recent');
     $this->assign('casesSummary', $summary);
     if (!empty($upcoming)) {
         $this->assign('upcomingCases', $upcoming);
     }
     if (!empty($recent)) {
         $this->assign('recentCases', $recent);
     }
 }
开发者ID:hguru,项目名称:224Civi,代码行数:52,代码来源:DashBoard.php

示例6: testGetCasesSummary

 /**
  * FIXME: need to create an activity to run this test
  * function testGetCases() {
  *   $cases = CRM_Case_BAO_Case::getCases(TRUE, 3);
  *   $this->assertEquals('Housing Support', $cases[1]['case_type']);
  *   $this->assertEquals(1, $cases[1]['case_type_id']);
  * }
  */
 public function testGetCasesSummary()
 {
     $cases = CRM_Case_BAO_Case::getCasesSummary(TRUE, 3);
     $this->assertEquals(1, $cases['rows']['Housing Support']['Ongoing']['count']);
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:13,代码来源:CaseTest.php


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