Commit | Line | Data |
---|---|---|
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 |
11 | namespace 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 |
204c3c29 | 19 | * @groupWeightsBy custom_group_id |
d44cc3cb | 20 | * @since 5.19 |
19b53e5b C |
21 | * @package Civi\Api4 |
22 | */ | |
23 | class CustomField extends Generic\DAOEntity { | |
052cd546 | 24 | use Generic\Traits\ManagedEntity; |
076fe09a | 25 | use Generic\Traits\SortableEntity; |
19b53e5b | 26 | |
ed3f5877 CW |
27 | /** |
28 | * @param bool $checkPermissions | |
29 | * @return Action\CustomField\Create | |
30 | */ | |
31 | public static function create($checkPermissions = TRUE) { | |
32 | return (new Action\CustomField\Create(__CLASS__, __FUNCTION__)) | |
33 | ->setCheckPermissions($checkPermissions); | |
34 | } | |
35 | ||
36 | /** | |
37 | * @param bool $checkPermissions | |
38 | * @return Action\CustomField\Save | |
39 | */ | |
40 | public static function save($checkPermissions = TRUE) { | |
41 | return (new Action\CustomField\Save(__CLASS__, __FUNCTION__)) | |
42 | ->setCheckPermissions($checkPermissions); | |
43 | } | |
44 | ||
45 | /** | |
46 | * @param bool $checkPermissions | |
47 | * @return Action\CustomField\Update | |
48 | */ | |
49 | public static function update($checkPermissions = TRUE) { | |
50 | return (new Action\CustomField\Update(__CLASS__, __FUNCTION__)) | |
51 | ->setCheckPermissions($checkPermissions); | |
52 | } | |
53 | ||
19b53e5b | 54 | } |