Remove use of ignoreException() from SMTP settings form.
[civicrm-core.git] / Civi / Api4 / GroupContact.php
index 7af2722431e846c3a54a0a594b8b9c5f49c7b366..086fb9b273944e42e338861a95196716d4ec3631 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
- * $Id$
- *
  */
 
-
 namespace Civi\Api4;
 
 /**
@@ -27,29 +24,39 @@ 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
+ * @see \Civi\Api4\Group
+ * @searchable false
  * @package Civi\Api4
  */
 class GroupContact extends Generic\DAOEntity {
+  use Generic\Traits\EntityBridge;
 
   /**
+   * @param bool $checkPermissions
    * @return Action\GroupContact\Create
    */
-  public static function create() {
-    return new Action\GroupContact\Create(__CLASS__, __FUNCTION__);
+  public static function create($checkPermissions = TRUE) {
+    return (new Action\GroupContact\Create(__CLASS__, __FUNCTION__))
+      ->setCheckPermissions($checkPermissions);
   }
 
   /**
+   * @param bool $checkPermissions
    * @return Action\GroupContact\Save
    */
-  public static function save() {
-    return new Action\GroupContact\Save(__CLASS__, __FUNCTION__);
+  public static function save($checkPermissions = TRUE) {
+    return (new Action\GroupContact\Save(__CLASS__, __FUNCTION__))
+      ->setCheckPermissions($checkPermissions);
   }
 
   /**
+   * @param bool $checkPermissions
    * @return Action\GroupContact\Update
    */
-  public static function update() {
-    return new Action\GroupContact\Update(__CLASS__, __FUNCTION__);
+  public static function update($checkPermissions = TRUE) {
+    return (new Action\GroupContact\Update(__CLASS__, __FUNCTION__))
+      ->setCheckPermissions($checkPermissions);
   }
 
 }