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