4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
20 namespace Civi\Api4\Action\GroupContact
;
25 * @method $this setMethod(string $method) Indicate who added/removed the group.
26 * @method string getMethod()
27 * @method $this setTracking(string $tracking) Specify ip address or other tracking info.
28 * @method string getTracking()
30 trait GroupContactSaveTrait
{
33 * String to indicate who added/removed the group.
37 protected $method = 'API';
40 * IP address or other tracking info about who performed this group subscription.
44 protected $tracking = '';
49 protected function writeObjects($items) {
50 foreach ($items as &$item) {
51 $item['method'] = $this->method
;
52 $item['tracking'] = $this->tracking
;
54 return parent
::writeObjects($items);