Merge pull request #21937 from eileenmcnaughton/upit
[civicrm-core.git] / Civi / Api4 / GroupContact.php
index 086fb9b273944e42e338861a95196716d4ec3631..cb7259ef9e31e74266062332cb723fbdd0d79322 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC. All rights reserved.                        |
@@ -9,13 +8,6 @@
  | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- */
-
 namespace Civi\Api4;
 
 /**
@@ -24,9 +16,11 @@ namespace Civi\Api4;
  * A contact can either be "Added" "Removed" or "Pending" in a group.
  * CiviCRM only considers them to be "in" a group if their status is "Added".
  *
- * @bridge group_id contact_id
+ * @ui_join_filters status
+ *
+ * @searchable bridge
  * @see \Civi\Api4\Group
- * @searchable false
+ * @since 5.19
  * @package Civi\Api4
  */
 class GroupContact extends Generic\DAOEntity {
@@ -59,4 +53,16 @@ class GroupContact extends Generic\DAOEntity {
       ->setCheckPermissions($checkPermissions);
   }
 
+  /**
+   * @return array
+   */
+  public static function getInfo() {
+    $info = parent::getInfo();
+    $info['bridge'] = [
+      'group_id' => ['description' => ts('Static (non-smart) group contacts')],
+      'contact_id' => ['description' => ts('Static (non-smart) group contacts')],
+    ];
+    return $info;
+  }
+
 }