diff options
author | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
commit | fc7369835258467bf97eb64f184b93691f9a9fd5 (patch) | |
tree | daabd60089d2dd76d9f5fb416b005fbe159c799d /www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Contact.php |
first commit
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Contact.php')
-rw-r--r-- | www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Contact.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Contact.php b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Contact.php new file mode 100644 index 00000000..cca8c335 --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Contact.php @@ -0,0 +1,39 @@ +<?php + +namespace Civi\Api4; + +/** + * Contacts - Individuals, Organizations, Households. + * + * This is the central entity in the CiviCRM database, and links to + * many other entities (Email, Phone, Participant, etc.). + * + * Creating a new contact requires at minimum a name or email address. + * + * @package Civi\Api4 + */ +class Contact extends Generic\DAOEntity { + + /** + * @return Action\Contact\Create + */ + public static function create() { + return new Action\Contact\Create(__CLASS__, __FUNCTION__); + } + + /** + * @return \Civi\Api4\Generic\DAOUpdateAction + */ + public static function update() { + // For some reason the contact bao requires this for updating + return new Generic\DAOUpdateAction(__CLASS__, __FUNCTION__, ['id', 'contact_type']); + } + + /** + * @return \Civi\Api4\Action\Contact\GetFields + */ + public static function getFields() { + return new Action\Contact\GetFields(__CLASS__, __FUNCTION__); + } + +} |