Merge pull request #22086 from civicrm/5.44
[civicrm-core.git] / Civi / Api4 / Contact.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 * Contacts - Individuals, Organizations, Households.
15 *
16 * This is the central entity in the CiviCRM database, and links to
17 * many other entities (Email, Phone, Participant, etc.).
18 *
19 * Creating a new contact requires at minimum a name or email address.
20 *
21 * @see https://docs.civicrm.org/user/en/latest/organising-your-data/contacts/
22 * @searchable primary
23 * @since 5.19
24 * @package Civi\Api4
25 */
26 class Contact extends Generic\DAOEntity {
27
28 /**
29 * @param bool $checkPermissions
30 * @return Action\Contact\GetChecksum
31 */
32 public static function getChecksum($checkPermissions = TRUE) {
33 return (new Action\Contact\GetChecksum(__CLASS__, __FUNCTION__))
34 ->setCheckPermissions($checkPermissions);
35 }
36
37 /**
38 * @param bool $checkPermissions
39 * @return Action\Contact\ValidateChecksum
40 */
41 public static function validateChecksum($checkPermissions = TRUE) {
42 return (new Action\Contact\ValidateChecksum(__CLASS__, __FUNCTION__))
43 ->setCheckPermissions($checkPermissions);
44 }
45
46 }