Merge pull request #24117 from civicrm/5.52
[civicrm-core.git] / Civi / Api4 / Contribution.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11 namespace Civi\Api4;
12
13 /**
14 * Contribution entity.
15 *
16 * @searchable primary
17 * @since 5.19
18 * @package Civi\Api4
19 */
20 class Contribution extends Generic\DAOEntity {
21
22 /**
23 * @param bool $checkPermissions
24 * @return Action\Contribution\Create
25 */
26 public static function create($checkPermissions = TRUE) {
27 return (new Action\Contribution\Create(__CLASS__, __FUNCTION__))
28 ->setCheckPermissions($checkPermissions);
29 }
30
31 /**
32 * @param bool $checkPermissions
33 * @return Action\Contribution\Save
34 */
35 public static function save($checkPermissions = TRUE) {
36 return (new Action\Contribution\Save(__CLASS__, __FUNCTION__))
37 ->setCheckPermissions($checkPermissions);
38 }
39
40 /**
41 * @param bool $checkPermissions
42 * @return Action\Contribution\Update
43 */
44 public static function update($checkPermissions = TRUE) {
45 return (new Action\Contribution\Update(__CLASS__, __FUNCTION__))
46 ->setCheckPermissions($checkPermissions);
47 }
48
49 }