3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 +--------------------------------------------------------------------+
13 * This api exposes CiviCRM website records.
15 * @package CiviCRM_APIv3
19 * Add an Website for a contact.
21 * @param array $params
26 function civicrm_api3_website_create($params) {
27 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__
), $params, 'Website');
31 * Adjust Metadata for Create action.
33 * The metadata is used for setting defaults, documentation & validation.
35 * @param array $params
36 * Array of parameters determined by getfields.
38 function _civicrm_api3_website_create_spec(&$params) {
39 $params['contact_id']['api.required'] = 1;
43 * Deletes an existing Website.
45 * @param array $params
49 * @throws \API_Exception
51 function civicrm_api3_website_delete($params) {
52 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__
), $params);
56 * Retrieve one or more websites.
58 * @param array $params
63 function civicrm_api3_website_get($params) {
64 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__
), $params, TRUE, 'Website');