Merge pull request #22664 from braders/membershipview-default-values
[civicrm-core.git] / Civi / Api4 / Generic / DAOUpdateAction.php
CommitLineData
19b53e5b
C
1<?php
2
380f3545
TO
3/*
4 +--------------------------------------------------------------------+
41498ac5 5 | Copyright CiviCRM LLC. All rights reserved. |
380f3545 6 | |
41498ac5
TO
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 |
380f3545
TO
10 +--------------------------------------------------------------------+
11 */
12
19b53e5b
C
13namespace Civi\Api4\Generic;
14
15/**
fc95d9a5 16 * Update one or more $ENTITY with new values.
19b53e5b 17 *
29ab318b
CW
18 * Use the `where` clause to bulk update multiple records,
19 * or supply 'id' as a value to update a single record.
19b53e5b
C
20 */
21class DAOUpdateAction extends AbstractUpdateAction {
22 use Traits\DAOActionTrait;
23
24 /**
29ab318b
CW
25 * @param array $items
26 * @return array
27 * @throws \API_Exception
28 * @throws \CRM_Core_Exception
19b53e5b 29 */
29ab318b
CW
30 protected function updateRecords(array $items): array {
31 return $this->writeObjects($items);
19b53e5b
C
32 }
33
34}