Merge pull request #24203 from colemanw/fixTagFilter553
[civicrm-core.git] / Civi / Api4 / CaseContact.php
index b3e3405183778746b9ddfd3b7b754f8506d4ef2f..da651d499fd29dab5b3eb0e0de516e19cec60817 100644 (file)
@@ -27,4 +27,24 @@ class CaseContact extends Generic\DAOEntity {
     return $plural ? ts('Case Clients') : ts('Case Client');
   }
 
+  /**
+   * @return array
+   */
+  public static function getInfo() {
+    $info = parent::getInfo();
+    $info['bridge_title'] = ts('Clients');
+    $info['bridge'] = [
+      'case_id' => [
+        'to' => 'contact_id',
+        'description' => ts('Cases with this contact as a client'),
+      ],
+      'contact_id' => [
+        'label' => ts('Clients'),
+        'to' => 'case_id',
+        'description' => ts('Clients for this case'),
+      ],
+    ];
+    return $info;
+  }
+
 }