3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
14 * GroupContact entity - link between groups and contacts.
16 * A contact can either be "Added" "Removed" or "Pending" in a group.
17 * CiviCRM only considers them to be "in" a group if their status is "Added".
19 * @ui_join_filters status
22 * @see \Civi\Api4\Group
26 class GroupContact
extends Generic\DAOEntity
{
27 use Generic\Traits\EntityBridge
;
30 * @param bool $checkPermissions
31 * @return Action\GroupContact\Create
33 public static function create($checkPermissions = TRUE) {
34 return (new Action\GroupContact\
Create(__CLASS__
, __FUNCTION__
))
35 ->setCheckPermissions($checkPermissions);
39 * @param bool $checkPermissions
40 * @return Action\GroupContact\Save
42 public static function save($checkPermissions = TRUE) {
43 return (new Action\GroupContact\
Save(__CLASS__
, __FUNCTION__
))
44 ->setCheckPermissions($checkPermissions);
48 * @param bool $checkPermissions
49 * @return Action\GroupContact\Update
51 public static function update($checkPermissions = TRUE) {
52 return (new Action\GroupContact\
Update(__CLASS__
, __FUNCTION__
))
53 ->setCheckPermissions($checkPermissions);
59 public static function getInfo() {
60 $info = parent
::getInfo();
62 'group_id' => ['description' => ts('Static (non-smart) group contacts')],
63 'contact_id' => ['description' => ts('Static (non-smart) group contacts')],