Merge pull request #17878 from civicrm/5.28
[civicrm-core.git] / Civi / Api4 / GroupContact.php
index 7af2722431e846c3a54a0a594b8b9c5f49c7b366..98e0eb626896dea675b8505e961ab2de181755d6 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
- * $Id$
- *
  */
 
-
 namespace Civi\Api4;
 
 /**
@@ -27,29 +24,37 @@ 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".
  *
+ * @see \Civi\Api4\Group
+ *
  * @package Civi\Api4
  */
 class GroupContact extends Generic\DAOEntity {
 
   /**
+   * @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);
   }
 
 }