CRM-20312 regenerated DAOS with indexes
[civicrm-core.git] / CRM / Case / ManagedEntities.php
index daeebe989b037043d0cc1e29e64f99dda9c22c64..382f9a05a7b3f0ac1e251591898eee4324c8e777 100644 (file)
@@ -110,8 +110,11 @@ class CRM_Case_ManagedEntities {
   public static function createManagedRelationshipTypes(CRM_Case_XMLRepository $xmlRepo, CRM_Core_ManagedEntities $me) {
     $result = array();
 
-    $p = new CRM_Case_XMLProcessor();
-    $validRelTypes = $p->allRelationshipTypes();
+    if (!isset(Civi::$statics[__CLASS__]['reltypes'])) {
+      $relationshipInfo = CRM_Core_PseudoConstant::relationshipType('label', TRUE, NULL);
+      Civi::$statics[__CLASS__]['reltypes'] = CRM_Utils_Array::collect(CRM_Case_XMLProcessor::REL_TYPE_CNAME, $relationshipInfo);
+    }
+    $validRelTypes = Civi::$statics[__CLASS__]['reltypes'];
 
     $relTypes = $xmlRepo->getAllDeclaredRelationshipTypes();
     foreach ($relTypes as $relType) {