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


PHP CRM_Case_PseudoConstant类代码示例

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


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

示例1: testCaseType

 public function testCaseType()
 {
     CRM_Core_PseudoConstant::flush();
     $caseTypes = CRM_Case_PseudoConstant::caseType();
     $expectedTypes = array(1 => 'Housing Support', 2 => 'Adult Day Care Referral');
     $this->assertEquals($expectedTypes, $caseTypes);
 }
开发者ID:hyebahi,项目名称:civicrm-core,代码行数:7,代码来源:PseudoConstantTest.php

示例2: preProcess

 /**  
  * Function to set variables up before form is built  
  *                                                            
  * @return void  
  * @access public  
  */
 public function preProcess()
 {
     $this->_contactID = $this->get('cid');
     $this->_caseID = $this->get('id');
     $this->assign('caseID', $this->_caseID);
     $this->assign('contactID', $this->_contactID);
     //retrieve details about case
     $params = array('id' => $this->_caseID);
     $returnProperties = array('case_type_id', 'subject', 'status_id', 'start_date');
     CRM_Core_DAO::commonRetrieve('CRM_Case_BAO_Case', $params, $values, $returnProperties);
     $values['case_type_id'] = explode(CRM_Case_BAO_Case::VALUE_SEPERATOR, CRM_Utils_Array::value('case_type_id', $values));
     $statuses = CRM_Case_PseudoConstant::caseStatus();
     $caseTypeName = CRM_Case_PseudoConstant::caseTypeName($this->_caseID);
     $caseType = CRM_Core_OptionGroup::getLabel('case_type', $caseTypeName['id']);
     $this->_caseDetails = array('case_type' => $caseType, 'case_status' => $statuses[$values['case_status_id']], 'case_subject' => CRM_Utils_Array::value('subject', $values), 'case_start_date' => $values['case_start_date']);
     $this->_caseType = $caseTypeName['name'];
     $this->assign('caseDetails', $this->_caseDetails);
     $newActivityUrl = CRM_Utils_System::url('civicrm/case/activity', "action=add&reset=1&cid={$this->_contactID}&caseid={$this->_caseID}&atype=", false, null, false);
     $this->assign('newActivityUrl', $newActivityUrl);
     $reportUrl = CRM_Utils_System::url('civicrm/case/report', "reset=1&cid={$this->_contactID}&caseid={$this->_caseID}&asn=", false, null, false);
     $this->assign('reportUrl', $reportUrl);
     // add to recently viewed
     require_once 'CRM/Utils/Recent.php';
     require_once 'CRM/Contact/BAO/Contact.php';
     $url = CRM_Utils_System::url('civicrm/contact/view/case', "action=view&reset=1&id={$this->_caseID}&cid={$this->_contactID}&context=home");
     $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactID);
     $this->assign('displayName', $displayName);
     $title = $displayName . ' - ' . $caseType;
     // add the recently created case
     CRM_Utils_Recent::add($title, $url, $this->_caseID, 'Case', $this->_contactID, null);
 }
开发者ID:bhirsch,项目名称:civicrm,代码行数:37,代码来源:CaseView.php

示例3: preProcess

 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;
     }
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
     // contact id is not mandatory for case form. If not found, don't call
     // parent's pre-process and proceed further.
     if ($this->_contactId) {
         parent::preProcess();
     } else {
         // we would need action to proceed further.
         $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'add');
         if ($this->_action & CRM_Core_Action::VIEW) {
             CRM_Core_Error::fatal('Contact Id is required for view action.');
         }
         $this->assign('action', $this->_action);
     }
     $activityTypes = CRM_Case_PseudoConstant::activityType();
     $this->assign('openCaseId', $activityTypes['Open Case']['id']);
     $this->assign('changeCaseTypeId', $activityTypes['Change Case Type']['id']);
     $this->assign('changeCaseStatusId', $activityTypes['Change Case Status']['id']);
     $this->assign('changeCaseStartDateId', $activityTypes['Change Case Start Date']['id']);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:30,代码来源:Tab.php

示例4: preProcess

 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;
     }
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse');
     if ($this->_contactId) {
         $this->assign('contactId', $this->_contactId);
         // check logged in url permission
         require_once 'CRM/Contact/Page/View.php';
         CRM_Contact_Page_View::checkUserPermission($this);
     } else {
         if ($this->_action & CRM_Core_Action::VIEW) {
             CRM_Core_Error::fatal('Contact Id is required for view action.');
         }
     }
     $activityTypes = CRM_Case_PseudoConstant::activityType();
     $this->assign('openCaseId', $activityTypes['Open Case']['id']);
     $this->assign('changeCaseTypeId', $activityTypes['Change Case Type']['id']);
     $this->assign('changeCaseStatusId', $activityTypes['Change Case Status']['id']);
     $this->assign('changeCaseStartDateId', $activityTypes['Change Case Start Date']['id']);
 }
开发者ID:bhirsch,项目名称:civicrm,代码行数:29,代码来源:Tab.php

示例5: __construct

 /**
  * Class constructor.
  */
 public function __construct()
 {
     // don’t display the ‘Add these Contacts to Group’ button
     $this->_add2groupSupported = FALSE;
     $dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN);
     $this->loggingDB = $dsn['database'];
     // used for redirect back to contact summary
     $this->cid = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject);
     $activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
     $sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
     $assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);
     $targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts);
     $this->_logTables = array('log_civicrm_contact' => array('fk' => 'id'), 'log_civicrm_email' => array('fk' => 'contact_id', 'log_type' => 'Contact'), 'log_civicrm_phone' => array('fk' => 'contact_id', 'log_type' => 'Contact'), 'log_civicrm_address' => array('fk' => 'contact_id', 'log_type' => 'Contact'), 'log_civicrm_note' => array('fk' => 'entity_id', 'entity_table' => TRUE, 'bracket_info' => array('table' => 'log_civicrm_note', 'column' => 'subject')), 'log_civicrm_note_comment' => array('fk' => 'entity_id', 'table_name' => 'log_civicrm_note', 'joins' => array('table' => 'log_civicrm_note', 'join' => "entity_log_civireport.entity_id = fk_table.id AND entity_log_civireport.entity_table = 'civicrm_note'"), 'entity_table' => TRUE, 'bracket_info' => array('table' => 'log_civicrm_note', 'column' => 'subject')), 'log_civicrm_group_contact' => array('fk' => 'contact_id', 'bracket_info' => array('entity_column' => 'group_id', 'table' => 'log_civicrm_group', 'column' => 'title'), 'action_column' => 'status', 'log_type' => 'Group'), 'log_civicrm_entity_tag' => array('fk' => 'entity_id', 'bracket_info' => array('entity_column' => 'tag_id', 'table' => 'log_civicrm_tag', 'column' => 'name'), 'entity_table' => TRUE), 'log_civicrm_relationship' => array('fk' => 'contact_id_a', 'bracket_info' => array('entity_column' => 'relationship_type_id', 'table' => 'log_civicrm_relationship_type', 'column' => 'label_a_b')), 'log_civicrm_activity_for_target' => array('fk' => 'contact_id', 'table_name' => 'log_civicrm_activity', 'joins' => array('table' => 'log_civicrm_activity_contact', 'join' => "(entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$targetID})"), 'bracket_info' => array('entity_column' => 'activity_type_id', 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE)), 'log_type' => 'Activity'), 'log_civicrm_activity_for_assignee' => array('fk' => 'contact_id', 'table_name' => 'log_civicrm_activity', 'joins' => array('table' => 'log_civicrm_activity_contact', 'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$assigneeID}"), 'bracket_info' => array('entity_column' => 'activity_type_id', 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE)), 'log_type' => 'Activity'), 'log_civicrm_activity_for_source' => array('fk' => 'contact_id', 'table_name' => 'log_civicrm_activity', 'joins' => array('table' => 'log_civicrm_activity_contact', 'join' => "entity_log_civireport.id = fk_table.activity_id AND fk_table.record_type_id = {$sourceID}"), 'bracket_info' => array('entity_column' => 'activity_type_id', 'options' => CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE)), 'log_type' => 'Activity'), 'log_civicrm_case' => array('fk' => 'contact_id', 'joins' => array('table' => 'log_civicrm_case_contact', 'join' => 'entity_log_civireport.id = fk_table.case_id'), 'bracket_info' => array('entity_column' => 'case_type_id', 'options' => CRM_Case_PseudoConstant::caseType('title', FALSE))));
     $logging = new CRM_Logging_Schema();
     // build _logTables for contact custom tables
     $customTables = $logging->entityCustomDataLogTables('Contact');
     foreach ($customTables as $table) {
         $this->_logTables[$table] = array('fk' => 'entity_id', 'log_type' => 'Contact');
     }
     // build _logTables for address custom tables
     $customTables = $logging->entityCustomDataLogTables('Address');
     foreach ($customTables as $table) {
         $this->_logTables[$table] = array('fk' => 'contact_id', 'joins' => array('table' => 'log_civicrm_address', 'join' => 'entity_log_civireport.entity_id = fk_table.id'), 'log_type' => 'Contact');
     }
     // Allow log tables to be extended via report hooks.
     CRM_Report_BAO_Hook::singleton()->alterLogTables($this, $this->_logTables);
     parent::__construct();
 }
开发者ID:vincent1892,项目名称:contact_report,代码行数:31,代码来源:ReportSummary.php

示例6:

 function &allActivityTypes($indexName = TRUE, $all = FALSE)
 {
     static $activityTypes = NULL;
     if (!$activityTypes) {
         $activityTypes = CRM_Case_PseudoConstant::caseActivityType($indexName, $all);
     }
     return $activityTypes;
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:8,代码来源:XMLProcessor.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     // create a logged in USER since the code references it for source_contact_id
     $this->createLoggedInUser();
     $caseTypes = CRM_Case_PseudoConstant::caseType();
     self::mocktest($caseTypes);
 }
开发者ID:JoeMurray,项目名称:civihr,代码行数:8,代码来源:HRCaseUtilsPipelineTest.php

示例8:

 function &allActivityTypes($indexName = true, $all = false)
 {
     static $activityTypes = null;
     if (!$activityTypes) {
         require_once 'CRM/Case/PseudoConstant.php';
         $activityTypes = CRM_Case_PseudoConstant::activityType($indexName, $all);
     }
     return $activityTypes;
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:9,代码来源:XMLProcessor.php

示例9: __construct

 /**
  * Constructor method
  */
 function __construct()
 {
     $this->_caseTypes = CRM_Case_PseudoConstant::caseType();
     $this->_caseStatus = CRM_Case_PseudoConstant::caseStatus();
     $this->setUserSelectList();
     $this->_deletedLabels = array('' => ts('- select -'), 0 => ts('No'), 1 => ts('Yes'));
     $this->_columns = array('pum_main' => array('fields' => array('case_id' => array('no_display' => TRUE, 'required' => TRUE), 'customer_name' => array('name' => 'customer_name', 'title' => ts('Client'), 'required' => TRUE), 'customer_id' => array('name' => 'customer_id', 'no_display' => TRUE, 'required' => TRUE), 'country_name' => array('name' => 'country_name', 'title' => ts('Country'), 'default' => TRUE), 'representative' => array('name' => 'representative', 'title' => ts('Representative'), 'default' => TRUE), 'representative_id' => array('name' => 'representative_id', 'no_display' => TRUE, 'required' => TRUE), 'case_type' => array('name' => 'case_type_id', 'title' => ts('Case Type'), 'default' => TRUE), 'case_status' => array('name' => 'case_status_id', 'title' => ts('Case Status'), 'default' => TRUE), 'expert' => array('name' => 'expert', 'title' => ts('Expert'), 'default' => TRUE), 'expert_id' => array('name' => 'expert_id', 'no_display' => TRUE, 'required' => TRUE), 'start_date' => array('name' => 'start_date', 'title' => ts('Activity Start Date'), 'default' => TRUE), 'end_date' => array('name' => 'end_date', 'title' => ts('Activity End Date'), 'default' => TRUE), 'ma_expert_approval' => array('name' => 'ma_expert_approval', 'title' => ts('Expert approves Main. Act'), 'default' => TRUE), 'pq_approved_sc' => array('name' => 'pq_approved_sc', 'title' => ts('PQ approved by SC'), 'default' => TRUE), 'pq_approved_cc' => array('name' => 'pq_approved_cc', 'title' => ts('PQ approved by CC'), 'default' => TRUE), 'cust_approves_expert' => array('name' => 'cust_approves_expert', 'title' => ts('Customer approves Expert'), 'default' => TRUE), 'briefing_date' => array('name' => 'briefing_date', 'title' => ts('Briefing Date'), 'default' => TRUE), 'briefing_status' => array('name' => 'briefing_status', 'title' => ts('Briefing Status'), 'default' => TRUE)), 'filters' => array('user_id' => array('title' => ts('Main Activities for User'), 'default' => 0, 'pseudofield' => 1, 'type' => CRM_Utils_Type::T_INT, 'operatorType' => CRM_Report_Form::OP_SELECT, 'options' => $this->_userSelectList), 'case_type_id' => array('title' => ts('Case Type'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->_caseTypes), 'case_status_id' => array('title' => ts('Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->_caseStatus)), 'order_bys' => array('start_date' => array('title' => ts('Activity Start Date'), 'name' => 'start_date', 'default' => 1))), 'case_status_weight' => array('dao' => 'CRM_Core_DAO_OptionValue', 'fields' => array('case_status_label' => array('name' => 'label', 'no_display' => TRUE, 'required' => TRUE), 'weight' => array('no_display' => TRUE, 'required' => TRUE)), 'order_bys' => array('case_status_label' => array('title' => ts('Case Status'), 'name' => 'label', 'default' => 1))));
     parent::__construct();
 }
开发者ID:PUMNL,项目名称:nl.pum.casereports,代码行数:12,代码来源:MainActivities.php

示例10: __construct

 /**
  * Constructor method
  */
 function __construct()
 {
     $this->_caseStatusList = CRM_Case_PseudoConstant::caseStatus();
     $this->setUserSelectList();
     $this->setSectorList();
     $this->_deletedLabels = array('' => ts('- select -'), 0 => ts('No'), 1 => ts('Yes'));
     $this->_columns = array('pum_expert' => array('fields' => array('case_id' => array('no_display' => TRUE, 'required' => TRUE), 'expert_name' => array('name' => 'expert_name', 'title' => ts('Expert'), 'required' => TRUE), 'sector_coordinator_name' => array('name' => 'sector_coordinator_name', 'title' => ts('Sector Coordinator'), 'required' => TRUE), 'status' => array('name' => 'status', 'title' => ts('Status'), 'default' => TRUE), 'sector_coordinator_id' => array('no_display' => TRUE, 'required' => TRUE), 'expert_id' => array('no_display' => TRUE, 'required' => TRUE)), 'filters' => array('user_id' => array('title' => ts('Expert Applications for User'), 'default' => 0, 'pseudofield' => 1, 'type' => CRM_Utils_Type::T_INT, 'operatorType' => CRM_Report_Form::OP_SELECT, 'options' => $this->_userSelectList), 'status_id' => array('title' => ts('Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->_caseStatusList)), 'order_bys' => array('status' => array('title' => ts('Case Status'), 'name' => 'status', 'default' => 1))));
     parent::__construct();
 }
开发者ID:PUMNL,项目名称:nl.pum.casereports,代码行数:12,代码来源:ExpertApplications.php

示例11: __construct

 /**
  * CRM_Casereports_Form_Report_Opportunities constructor.
  */
 function __construct()
 {
     $this->setUserSelectList();
     $this->_caseStatusList = CRM_Case_PseudoConstant::caseStatus();
     $this->_columns = array('pum_opportunity' => array('alias' => 'opp', 'fields' => array('case_id' => array('required' => TRUE, 'no_display' => TRUE, 'no_repeat' => TRUE), 'status_id' => array('no_display' => TRUE, 'required' => TRUE), 'client_id' => array('no_display' => TRUE, 'required' => TRUE), 'account_id' => array('no_display' => TRUE, 'required' => TRUE), 'client_name' => array('title' => ts("Client"), 'default' => TRUE), 'account_name' => array('title' => ts("Case Manager"), 'default' => TRUE), 'subject' => array('title' => ts('Subject'), 'no_repeat' => TRUE, 'default' => TRUE), 'status' => array('title' => ts('Status'), 'no_repeat' => TRUE, 'default' => TRUE), 'deadline' => array('title' => ts('Deadline'), 'no_repeat' => TRUE, 'type' => CRM_Utils_Type::T_DATE, 'default' => TRUE), 'quote_amount' => array('title' => ts('Quote Amount'), 'no_repeat' => TRUE, 'type' => CRM_Utils_Type::T_MONEY, 'default' => TRUE)), 'filters' => array('account_id' => array('title' => ts('Opportunities for User'), 'default' => 0, 'pseudofield' => 1, 'type' => CRM_Utils_Type::T_INT, 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->_userSelectList), 'status_id' => array('title' => ts('Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->_caseStatusList)), 'order_bys' => array('case_status' => array('title' => ts('Case Status'), 'name' => 'status', 'default' => 1))));
     $this->_groupFilter = FALSE;
     $this->_tagFilter = FALSE;
     parent::__construct();
 }
开发者ID:PUMNL,项目名称:nl.pum.casereports,代码行数:12,代码来源:Opportunities.php

示例12: testSequence

 public function testSequence()
 {
     $actStatuses = array_flip(\CRM_Core_PseudoConstant::activityStatus('name'));
     $caseStatuses = array_flip(\CRM_Case_PseudoConstant::caseStatus('name'));
     // Create case; schedule first activity
     \CRM_Utils_Time::setTime('2013-11-30 01:00:00');
     $case = $this->callAPISuccess('case', 'create', $this->_params);
     $analyzer = new \Civi\CCase\Analyzer($case['id']);
     $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
     $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
     $this->assertFalse($analyzer->hasActivity('Mental health evaluation'));
     $this->assertFalse($analyzer->hasActivity('Secure temporary housing'));
     // Edit details of first activity -- but don't finish it yet!
     \CRM_Utils_Time::setTime('2013-11-30 01:30:00');
     $this->callApiSuccess('Activity', 'create', array('id' => self::ag($analyzer->getSingleActivity('Medical evaluation'), 'id'), 'subject' => 'This is the new subject'));
     $analyzer = new \Civi\CCase\Analyzer($case['id']);
     $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
     $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
     $this->assertFalse($analyzer->hasActivity('Mental health evaluation'));
     $this->assertFalse($analyzer->hasActivity('Secure temporary housing'));
     // Complete first activity; schedule second
     \CRM_Utils_Time::setTime('2013-11-30 02:00:00');
     $this->callApiSuccess('Activity', 'create', array('id' => self::ag($analyzer->getSingleActivity('Medical evaluation'), 'id'), 'status_id' => $actStatuses['Completed']));
     $analyzer->flush();
     $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
     $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
     $this->assertApproxTime('2013-11-30 02:00:00', self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'status_id'));
     $this->assertFalse($analyzer->hasActivity('Secure temporary housing'));
     // Complete second activity; schedule third
     \CRM_Utils_Time::setTime('2013-11-30 03:00:00');
     $this->callApiSuccess('Activity', 'create', array('id' => self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'id'), 'status_id' => $actStatuses['Completed']));
     $analyzer->flush();
     $this->assertEquals($caseStatuses['Open'], self::ag($analyzer->getCase(), 'status_id'));
     $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
     $this->assertApproxTime('2013-11-30 02:00:00', self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'status_id'));
     $this->assertApproxTime('2013-11-30 03:00:00', self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Scheduled'], self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'status_id'));
     // Complete third activity; close case
     \CRM_Utils_Time::setTime('2013-11-30 04:00:00');
     $this->callApiSuccess('Activity', 'create', array('id' => self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'id'), 'status_id' => $actStatuses['Completed']));
     $analyzer->flush();
     $this->assertApproxTime('2013-11-30 01:00:00', self::ag($analyzer->getSingleActivity('Medical evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Medical evaluation'), 'status_id'));
     $this->assertApproxTime('2013-11-30 02:00:00', self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Mental health evaluation'), 'status_id'));
     $this->assertApproxTime('2013-11-30 03:00:00', self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'activity_date_time'));
     $this->assertEquals($actStatuses['Completed'], self::ag($analyzer->getSingleActivity('Secure temporary housing'), 'status_id'));
     $this->assertEquals($caseStatuses['Closed'], self::ag($analyzer->getCase(), 'status_id'));
     // */
 }
开发者ID:sdekok,项目名称:civicrm-core,代码行数:56,代码来源:SequenceListenerTest.php

示例13: buildQuickForm

 static function buildQuickForm(&$form)
 {
     require_once 'CRM/Case/PseudoConstant.php';
     $form->_caseStatus = CRM_Case_PseudoConstant::caseStatus();
     $form->_defaultCaseStatus = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $form->_caseId, 'status_id');
     if (!array_key_exists($form->_defaultCaseStatus, $form->_caseStatus)) {
         $form->_caseStatus[$form->_defaultCaseStatus] = CRM_Core_OptionGroup::getLabel('case_status', $form->_defaultCaseStatus, false);
     }
     $form->add('select', 'case_status_id', ts('Case Status'), $form->_caseStatus, true);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:10,代码来源:ChangeCaseStatus.php

示例14: buildQuickForm

 static function buildQuickForm(&$form)
 {
     $form->removeElement('status_id');
     $form->removeElement('priority_id');
     $form->_caseStatus = CRM_Case_PseudoConstant::caseStatus();
     $form->_defaultCaseStatus = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $form->_caseId, 'status_id');
     if (!array_key_exists($form->_defaultCaseStatus, $form->_caseStatus)) {
         $form->_caseStatus[$form->_defaultCaseStatus] = CRM_Core_OptionGroup::getLabel('case_status', $form->_defaultCaseStatus, FALSE);
     }
     $form->add('select', 'case_status_id', ts('Case Status'), $form->_caseStatus, TRUE);
 }
开发者ID:hguru,项目名称:224Civi,代码行数:11,代码来源:ChangeCaseStatus.php

示例15: __construct

 function __construct()
 {
     $this->case_statuses = CRM_Case_PseudoConstant::caseStatus();
     $rels = CRM_Core_PseudoConstant::relationshipType();
     foreach ($rels as $relid => $v) {
         $this->rel_types[$relid] = $v['label_b_a'];
     }
     $this->deleted_labels = array('' => ts('- select -'), 0 => ts('No'), 1 => ts('Yes'));
     $this->_columns = array('civicrm_c2' => array('dao' => 'CRM_Contact_DAO_Contact', 'fields' => array('display_name' => array('title' => ts('Client'), 'required' => true))), 'civicrm_case' => array('dao' => 'CRM_Case_DAO_Case', 'fields' => array('id' => array('title' => ts('Case ID'), 'required' => true), 'start_date' => array('title' => ts('Start Date'), 'default' => true), 'end_date' => array('title' => ts('End Date'), 'default' => true), 'status_id' => array('title' => ts('Status'), 'default' => true), 'duration' => array('title' => ts('Duration (Days)'), 'default' => false), 'is_deleted' => array('title' => ts('Deleted?'), 'default' => false, 'type' => CRM_Utils_Type::T_INT)), 'filters' => array('start_date' => array('title' => ts('Start Date'), 'operatorType' => CRM_Report_Form::OP_DATE), 'end_date' => array('title' => ts('End Date'), 'operatorType' => CRM_Report_Form::OP_DATE), 'status_id' => array('title' => ts('Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->case_statuses), 'is_deleted' => array('title' => ts('Deleted?'), 'type' => CRM_Report_Form::OP_INT, 'operatorType' => CRM_Report_Form::OP_SELECT, 'options' => $this->deleted_labels, 'default' => 0))), 'civicrm_contact' => array('dao' => 'CRM_Contact_DAO_Contact', 'fields' => array('sort_name' => array('title' => ts('Staff Member'), 'default' => true)), 'filters' => array('sort_name' => array('title' => ts('Staff Member')))), 'civicrm_relationship' => array('dao' => 'CRM_Contact_DAO_Relationship', 'filters' => array('relationship_type_id' => array('title' => ts('Staff Relationship'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->rel_types))), 'civicrm_relationship_type' => array('dao' => 'CRM_Contact_DAO_RelationshipType', 'fields' => array('label_b_a' => array('title' => ts('Relationship'), 'default' => true))), 'civicrm_case_contact' => array('dao' => 'CRM_Case_DAO_CaseContact'));
     parent::__construct();
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:11,代码来源:Summary.php


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