Merge pull request #22235 from kurund/contribution-import
[civicrm-core.git] / Civi / Api4 / CustomField.php
CommitLineData
19b53e5b 1<?php
380f3545
TO
2/*
3 +--------------------------------------------------------------------+
41498ac5 4 | Copyright CiviCRM LLC. All rights reserved. |
380f3545 5 | |
41498ac5
TO
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 |
380f3545
TO
9 +--------------------------------------------------------------------+
10 */
19b53e5b
C
11namespace Civi\Api4;
12
13/**
14 * CustomField entity.
15 *
0493ec47 16 * @see https://docs.civicrm.org/user/en/latest/organising-your-data/creating-custom-fields/
812fe84d 17 * @searchable secondary
076fe09a 18 * @orderBy weight
d44cc3cb 19 * @since 5.19
19b53e5b
C
20 * @package Civi\Api4
21 */
22class CustomField extends Generic\DAOEntity {
052cd546 23 use Generic\Traits\ManagedEntity;
076fe09a 24 use Generic\Traits\SortableEntity;
19b53e5b 25
ed3f5877
CW
26 /**
27 * @param bool $checkPermissions
28 * @return Action\CustomField\Create
29 */
30 public static function create($checkPermissions = TRUE) {
31 return (new Action\CustomField\Create(__CLASS__, __FUNCTION__))
32 ->setCheckPermissions($checkPermissions);
33 }
34
35 /**
36 * @param bool $checkPermissions
37 * @return Action\CustomField\Save
38 */
39 public static function save($checkPermissions = TRUE) {
40 return (new Action\CustomField\Save(__CLASS__, __FUNCTION__))
41 ->setCheckPermissions($checkPermissions);
42 }
43
44 /**
45 * @param bool $checkPermissions
46 * @return Action\CustomField\Update
47 */
48 public static function update($checkPermissions = TRUE) {
49 return (new Action\CustomField\Update(__CLASS__, __FUNCTION__))
50 ->setCheckPermissions($checkPermissions);
51 }
52
19b53e5b 53}