crmCaseType - Get full, sorted list of activities and relationship-types
authorTim Otten <totten@civicrm.org>
Wed, 4 Jun 2014 21:16:26 +0000 (14:16 -0700)
committerTim Otten <totten@civicrm.org>
Wed, 4 Jun 2014 21:16:26 +0000 (14:16 -0700)
CRM/Case/Info.php

index 8bd728d2c78e7d474f6ebab5cf59e45c29db4334..6cdfb926502d79765ef495e961a1a01dc6f9f194 100644 (file)
@@ -67,8 +67,19 @@ class CRM_Case_Info extends CRM_Core_Component_Info {
     );
     // Need full OptionValue records
     $actStatuses = civicrm_api3('OptionValue', 'get', array('option_group_id' => 'activity_status'));
-    $actTypes = civicrm_api3('OptionValue', 'get', array('option_group_id' => 'activity_type'));
-    $relTypes = civicrm_api3('RelationshipType', 'get', array());
+    $actTypes = civicrm_api3('OptionValue', 'get', array(
+      'option_group_id' => 'activity_type',
+      'options' => array(
+        'sort' => 'name',
+        'limit' => 0,
+      ),
+    ));
+    $relTypes = civicrm_api3('RelationshipType', 'get', array(
+      'options' => array(
+        'sort' => CRM_Case_XMLProcessor::REL_TYPE_CNAME,
+        'limit' => 0,
+      )
+    ));
 
     CRM_Core_Resources::singleton()->addSetting(array(
       'crmCaseType' => array(