mkdir($civicrm_root . "/api/v3/examples/$entity");
}
$f = fopen($civicrm_root . "/api/v3/examples/$entity/$exampleName.php", "w+b");
- fwrite($f, $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl'));
+ $contents = $smarty->fetch($civicrm_root . '/tests/templates/documentFunction.tpl');
+ $contents = \CRM_Core_CodeGen_Util_ArraySyntaxConverter::convert($contents);
+ fwrite($f, $contents);
fclose($f);
}
}
*/
function activity_get_example() {
$params = [
- 'contact_id' => 1,
- 'activity_type_id' => 9999,
- 'sequential' => 1,
- 'return.custom_1' => 1,
+ 'case_id' => [
+ 'IS NULL' => 1,
+ ],
];
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 1,
+ 'id' => 9,
'values' => [
- '0' => [
- 'id' => '1',
- 'activity_type_id' => '9999',
- 'subject' => 'test activity type id',
- 'activity_date_time' => '2011-06-02 14:36:13',
- 'duration' => '120',
- 'location' => 'Pennsylvania',
- 'details' => 'a test activity',
+ '9' => [
+ 'id' => '9',
+ 'activity_type_id' => '2',
+ 'subject' => 'Ask not what your API can do for you, but what you can do for your API.',
+ 'activity_date_time' => '2019-08-20 19:10:43',
'status_id' => '2',
- 'priority_id' => '1',
+ 'priority_id' => '2',
'is_test' => 0,
'is_auto' => 0,
'is_current_revision' => '1',
'is_deleted' => 0,
'is_star' => 0,
- 'custom_1' => 'custom string',
- 'source_contact_id' => '1',
- 'status' => 'Completed',
- 'activity_name' => 'Test activity type',
- 'custom_1_1' => 'custom string',
+ 'created_date' => '2013-07-28 08:49:19',
+ 'modified_date' => '2012-11-14 16:02:35',
+ 'source_contact_id' => '19',
+ 'source_contact_name' => 'Mr. Anthony Anderson II',
+ 'source_contact_sort_name' => 'Anderson, Anthony',
],
],
];
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testActivityGetContact_idCustom"
+* The test that created it is called "testGet"
* and can be found at:
-* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityCaseTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function activity_contact_delete_example() {
$params = [
- 'id' => 8,
+ 'id' => 11,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 849,
+ 'id' => 869,
'values' => [
- '849' => [
- 'id' => '849',
+ '869' => [
+ 'id' => '869',
'option_group_id' => '2',
'label' => 'send out letters',
'value' => '55',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 54,
+ 'count' => 35,
'values' => [
'1' => 'Meeting',
'2' => 'Phone Call',
'10' => 'Pledge Acknowledgment',
'11' => 'Pledge Reminder',
'12' => 'Inbound Email',
- '13' => 'Open Case',
- '14' => 'Follow up',
- '15' => 'Change Case Type',
- '16' => 'Change Case Status',
'17' => 'Membership Renewal Reminder',
- '18' => 'Change Case Start Date',
'19' => 'Bulk Email',
- '20' => 'Assign Case Role',
- '21' => 'Remove Case Role',
'22' => 'Print/Merge Document',
- '23' => 'Merge Case',
- '24' => 'Reassigned Case',
- '25' => 'Link Cases',
- '26' => 'Change Case Tags',
- '27' => 'Add Client To Case',
- '28' => 'Survey',
- '29' => 'Canvass',
- '30' => 'PhoneBank',
- '31' => 'WalkList',
- '32' => 'Petition Signature',
- '33' => 'Change Custom Data',
'34' => 'Mass SMS',
'35' => 'Change Membership Status',
'36' => 'Change Membership Type',
'50' => 'Emailed Invoice',
'51' => 'Contact Merged',
'52' => 'Contact Deleted by Merge',
- '53' => 'Failed Payment',
- '54' => 'Close Accounting Period',
+ '54' => 'Failed Payment',
],
'deprecated' => 'The ActivityType api is deprecated. Please use the OptionValue api instead.',
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'values' => [
'0' => [
'id' => '1',
- 'contact_id' => '20',
- 'location_type_id' => '18',
+ 'contact_id' => '4',
+ 'location_type_id' => '33',
'is_primary' => '1',
'is_billing' => 0,
'street_address' => 'Ambachtstraat 23',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$params = [
'street_parsing' => 1,
'street_address' => '54A Excelsior Ave. Apt 1C',
- 'location_type_id' => 7,
+ 'location_type_id' => 8,
'contact_id' => 4,
];
'1' => [
'id' => '1',
'contact_id' => '4',
- 'location_type_id' => '7',
+ 'location_type_id' => '8',
'is_primary' => '1',
'is_billing' => 0,
'street_address' => '54A Excelsior Ave. Apt 1C',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'values' => [
'0' => [
'id' => '2',
- 'contact_id' => '19',
- 'location_type_id' => '17',
+ 'contact_id' => '4',
+ 'location_type_id' => '31',
'is_primary' => '1',
'is_billing' => 0,
'street_address' => 'yzy',
],
'1' => [
'id' => '1',
- 'contact_id' => '19',
- 'location_type_id' => '17',
+ 'contact_id' => '4',
+ 'location_type_id' => '31',
'is_primary' => 0,
'is_billing' => 0,
'street_address' => 'Ambachtstraat 23',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function address_create_example() {
$params = [
- 'contact_id' => 3,
- 'location_type_id' => 6,
+ 'contact_id' => 4,
'street_name' => 'Ambachtstraat',
'street_number' => '23',
'street_address' => 'Ambachtstraat 23',
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 1,
'values' => [
- '2' => [
- 'id' => '2',
- 'contact_id' => '3',
- 'location_type_id' => '6',
+ '1' => [
+ 'id' => '1',
+ 'contact_id' => '4',
+ 'location_type_id' => '1',
'is_primary' => '1',
'is_billing' => 0,
'street_address' => 'Ambachtstraat 23',
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testCreateAddress"
+* The test that created it is called "testCreateAddressDefaultLocation"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function address_get_example() {
$params = [
- 'contact_id' => 17,
+ 'contact_id' => 4,
'street_name' => 'Ambachtstraat',
];
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '17',
- 'location_type_id' => '15',
+ 'contact_id' => '4',
+ 'location_type_id' => '27',
'is_primary' => '1',
'is_billing' => 0,
'street_address' => 'Ambachtstraat 23',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/AddressTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/BatchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'status_id' => '',
'external_identifier' => '',
'parent_id' => '',
- 'is_active' => '',
+ 'is_active' => '1',
'created_id' => '',
'created_date' => '2013-07-28 08:49:19',
'last_modified_id' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CampaignTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CampaignTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CampaignTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function case_create_example() {
$params = [
+ 'case_type_id' => 1,
'subject' => 'Test case',
'contact_id' => 17,
- 'case_type' => 'housing_support',
+ 'custom_1' => 'custom string',
];
try{
'end_date' => '',
'details' => '',
'status_id' => '1',
- 'is_deleted' => '',
+ 'is_deleted' => 0,
+ 'created_date' => '2013-07-28 08:49:19',
+ 'modified_date' => '2012-11-14 16:02:35',
],
],
];
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testCaseCreate"
+* The test that created it is called "testCaseCreateCustom"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CaseTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the CaseContact.create API.
+ *
+ * @return array
+ * API result array
+ */
+function case_contact_create_example() {
+ $params = [
+ 'case_id' => 2,
+ 'contact_id' => 20,
+ ];
+
+ try{
+ $result = civicrm_api3('CaseContact', 'create', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function case_contact_create_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 3,
+ 'values' => [
+ '3' => [
+ 'id' => '3',
+ 'case_id' => '2',
+ 'contact_id' => '20',
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testCaseContactCreate"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CaseContactTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CaseContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 36,
+ 'count' => 35,
'values' => [
'1' => 'Meeting',
'2' => 'Phone Call',
'50' => 'Emailed Invoice',
'51' => 'Contact Merged',
'52' => 'Contact Deleted by Merge',
- '53' => 'Failed Payment',
- '54' => 'Close Accounting Period',
+ '54' => 'Failed Payment',
],
'deprecated' => 'The Constant api is deprecated as of CiviCRM 4.4. Please use the getoptions api action instead.',
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'languages' => 'English (United States)',
'individual_prefix' => '',
'individual_suffix' => '',
- 'communication_style' => '',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'display_name' => 'abc3 xyz3',
'contribution_id' => '2',
'currency' => 'USD',
- 'payment_instrument' => 'Credit Card',
+ 'contribution_recur_id' => '',
+ 'contribution_status_id' => '1',
+ 'contribution_campaign_id' => '',
'payment_instrument_id' => '1',
'receive_date' => '2011-01-01 00:00:00',
'non_deductible_amount' => '10.00',
'net_amount' => '90.00',
'trxn_id' => '12335',
'invoice_id' => '67830',
- 'cancel_date' => '',
+ 'invoice_number' => '',
+ 'contribution_cancel_date' => '',
'cancel_reason' => '',
'receipt_date' => '',
'thankyou_date' => '',
'contribution_source' => 'SSF',
'amount_level' => '',
- 'contribution_recur_id' => '',
'is_test' => 0,
'is_pay_later' => 0,
- 'contribution_status' => 'Completed',
- 'contribution_status_id' => '1',
'contribution_check_number' => '',
- 'contribution_campaign_id' => '',
- 'financial_type_id' => '1',
- 'financial_type' => 'Donation',
- 'product_id' => '',
- 'product_name' => '',
- 'sku' => '',
- 'contribution_product_id' => '',
- 'product_option' => '',
- 'fulfilled_date' => '',
- 'contribution_start_date' => '',
- 'contribution_end_date' => '',
'financial_account_id' => '1',
'accounting_code' => '4200',
'campaign_id' => '',
'contribution_campaign_title' => '',
+ 'financial_type_id' => '1',
+ 'financial_type' => 'Donation',
'contribution_note' => '',
'contribution_batch' => '',
+ 'contribution_recur_status' => 'Completed',
+ 'payment_instrument' => 'Credit Card',
+ 'contribution_status' => 'Completed',
'check_number' => '',
'instrument_id' => '1',
+ 'cancel_date' => '',
'id' => '2',
'contribution_type_id' => '1',
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'languages' => 'English (United States)',
'individual_prefix' => '',
'individual_suffix' => '',
- 'communication_style' => '',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'count' => 0,
'values' => [],
],
- 'api.Membership.getCount' => 0,
+ 'api.Membership.getCount' => 1,
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'languages' => 'English (United States)',
'individual_prefix' => '',
'individual_suffix' => '',
- 'communication_style' => '',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'invoice_id' => 67990,
'source' => 'SSF',
'contribution_status_id' => 1,
+ 'skipCleanMoney' => 1,
],
'api.website.create' => [
'url' => 'http://civicrm.org',
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
'net_amount' => '90',
'trxn_id' => '15345',
'invoice_id' => '67990',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'invoice_id' => 67890,
'source' => 'SSF',
'contribution_status_id' => 1,
+ 'skipCleanMoney' => 1,
],
'api.website.create' => [
'0' => [
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
'net_amount' => '90',
'trxn_id' => '12345',
'invoice_id' => '67890',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'contact_id' => '3',
'contact_type' => 'Individual',
'contact_sub_type' => '',
- 'sort_name' => 'User 412074113, Logged In',
- 'display_name' => 'Mr. Logged In User 412074113 II',
+ 'sort_name' => 'User 202290815, Logged In',
+ 'display_name' => 'Mr. Logged In User 202290815 II',
'do_not_email' => 0,
'do_not_phone' => 0,
'do_not_mail' => 0,
'preferred_mail_format' => 'Both',
'first_name' => 'Logged In',
'middle_name' => 'J.',
- 'last_name' => 'User 412074113',
+ 'last_name' => 'User 202290815',
'prefix_id' => '3',
'suffix_id' => '3',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'street_address' => '',
'supplemental_address_1' => '',
'supplemental_address_2' => '',
+ 'supplemental_address_3' => '',
'city' => '',
'postal_code_suffix' => '',
'postal_code' => '',
'languages' => 'English (United States)',
'individual_prefix' => 'Mr.',
'individual_suffix' => 'II',
- 'communication_style' => '',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'contact_type' => 'Individual',
'display_name' => 'dlobo',
'api.participant' => [
- 'event_id' => 42,
+ 'event_id' => 43,
'status_id' => 1,
'role_id' => 1,
'format.only_id' => 1,
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contact_get_example() {
$params = [
- 'id' => 17,
+ 'id' => 3,
'format.is_success' => 1,
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contact_get_example() {
$params = [
- 'id' => 17,
+ 'id' => 3,
'format.only_id' => 1,
];
*/
function contact_get_expectedresult() {
- $expectedResult = 17;
+ $expectedResult = 3;
return $expectedResult;
}
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contact_getvalue_example() {
$params = [
- 'id' => 17,
+ 'id' => 3,
'return' => 'display_name',
];
*/
function contact_getvalue_expectedresult() {
- $expectedResult = 'Test Contact';
+ $expectedResult = 'Mr. Test Contact II';
return $expectedResult;
}
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'languages' => 'English (United States)',
'individual_prefix' => '',
'individual_suffix' => '',
- 'communication_style' => '',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 20,
+ 'count' => 29,
'values' => [
'0' => 'create',
'1' => 'delete',
'2' => 'duplicatecheck',
- '3' => 'get',
- '4' => 'getactions',
- '5' => 'getcount',
- '6' => 'getfield',
- '7' => 'getfields',
- '8' => 'getlist',
- '9' => 'getoptions',
- '10' => 'getquick',
- '11' => 'getrefcount',
- '12' => 'getsingle',
- '13' => 'getvalue',
- '14' => 'merge',
- '15' => 'proximity',
- '16' => 'replace',
- '17' => 'setvalue',
- '18' => 'update',
- '19' => 'validate',
+ '3' => 'example_action1',
+ '4' => 'example_action2',
+ '5' => 'get',
+ '6' => 'get_merge_conflicts',
+ '7' => 'getactions',
+ '8' => 'getcount',
+ '9' => 'getfield',
+ '10' => 'getfields',
+ '11' => 'getlist',
+ '12' => 'getmergedfrom',
+ '13' => 'getmergedto',
+ '14' => 'getoptions',
+ '15' => 'getquick',
+ '16' => 'getrefcount',
+ '17' => 'getsingle',
+ '18' => 'getunique',
+ '19' => 'getvalue',
+ '20' => 'merge',
+ '21' => 'proximity',
+ '22' => 'replace',
+ '23' => 'setvalue',
+ '24' => 'type_create',
+ '25' => 'type_delete',
+ '26' => 'type_get',
+ '27' => 'update',
+ '28' => 'validate',
],
'deprecated' => [
'getquick' => 'The "getquick" action is deprecated in favor of "getlist".',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contact_getcount_example() {
$params = [
- 'id' => 17,
+ 'id' => 3,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 55,
+ 'count' => 56,
'values' => [
'id' => [
'name' => 'id',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
'api.aliases' => [
'0' => 'contact_id',
],
'description' => 'Type of Contact.',
'maxlength' => 64,
'size' => 30,
- 'export' => TRUE,
'where' => 'civicrm_contact.contact_type',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'maxlength' => 64,
'labelColumn' => 'label',
'condition' => 'parent_id IS NULL',
],
+ 'is_core_field' => TRUE,
'api.required' => 1,
],
'contact_sub_type' => [
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'serialize' => 1,
'html' => [
'type' => 'Select',
'maxlength' => 255,
'labelColumn' => 'label',
'condition' => 'parent_id IS NOT NULL',
],
+ 'is_core_field' => TRUE,
],
'do_not_email' => [
'name' => 'do_not_email',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
],
'do_not_phone' => [
'name' => 'do_not_phone',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
],
'do_not_mail' => [
'name' => 'do_not_mail',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
],
'do_not_sms' => [
'name' => 'do_not_sms',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
],
'do_not_trade' => [
'name' => 'do_not_trade',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
],
'is_opt_out' => [
'name' => 'is_opt_out',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
],
'legal_identifier' => [
'name' => 'legal_identifier',
'type' => 2,
'title' => 'Legal Identifier',
- 'description' => 'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
- ',
+ 'description' => 'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.',
'maxlength' => 32,
'size' => 20,
'import' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 32,
'size' => 20,
],
+ 'is_core_field' => TRUE,
],
'external_identifier' => [
'name' => 'external_identifier',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 8,
],
+ 'is_core_field' => TRUE,
],
'sort_name' => [
'name' => 'sort_name',
'description' => 'Name used for sorting different contact types',
'maxlength' => 128,
'size' => 30,
- 'export' => TRUE,
'where' => 'civicrm_contact.sort_name',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'display_name' => [
'name' => 'display_name',
'description' => 'Formatted name representing preferred format for display/print/other output.',
'maxlength' => 128,
'size' => 30,
- 'export' => TRUE,
'where' => 'civicrm_contact.display_name',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'nick_name' => [
'name' => 'nick_name',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'legal_name' => [
'name' => 'legal_name',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'image_URL' => [
'name' => 'image_URL',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'File',
'rows' => 2,
'cols' => 80,
],
+ 'is_core_field' => TRUE,
],
'preferred_communication_method' => [
'name' => 'preferred_communication_method',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'serialize' => 1,
'html' => [
'type' => 'Select',
'maxlength' => 255,
'optionGroupName' => 'preferred_communication_method',
'optionEditPath' => 'civicrm/admin/options/preferred_communication_method',
],
+ 'is_core_field' => TRUE,
],
'preferred_language' => [
'name' => 'preferred_language',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'maxlength' => 5,
'keyColumn' => 'name',
'optionEditPath' => 'civicrm/admin/options/languages',
],
+ 'is_core_field' => TRUE,
],
'preferred_mail_format' => [
'name' => 'preferred_mail_format',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'maxlength' => 8,
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::pmf',
],
+ 'is_core_field' => TRUE,
],
'hash' => [
'name' => 'hash',
'description' => 'Key for validating requests related to this contact.',
'maxlength' => 32,
'size' => 20,
- 'export' => TRUE,
'where' => 'civicrm_contact.hash',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'api_key' => [
'name' => 'api_key',
'description' => 'API Key for validating requests related to this contact.',
'maxlength' => 32,
'size' => 20,
+ 'where' => 'civicrm_contact.api_key',
+ 'permission' => [
+ '0' => [
+ '0' => 'administer CiviCRM',
+ '1' => 'edit api keys',
+ ],
+ ],
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'first_name' => [
'name' => 'first_name',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'middle_name' => [
'name' => 'middle_name',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'last_name' => [
'name' => 'last_name',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'prefix_id' => [
'name' => 'prefix_id',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'size' => 6,
'optionGroupName' => 'individual_prefix',
'optionEditPath' => 'civicrm/admin/options/individual_prefix',
],
+ 'is_core_field' => TRUE,
'api.aliases' => [
'0' => 'individual_prefix',
'1' => 'individual_prefix_id',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'size' => 6,
'optionGroupName' => 'individual_suffix',
'optionEditPath' => 'civicrm/admin/options/individual_suffix',
],
+ 'is_core_field' => TRUE,
'api.aliases' => [
'0' => 'individual_suffix',
'1' => 'individual_suffix_id',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'communication_style_id' => [
'name' => 'communication_style_id',
'type' => 1,
'title' => 'Communication Style',
'description' => 'Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.',
- 'export' => TRUE,
'where' => 'civicrm_contact.communication_style_id',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'size' => 6,
'optionGroupName' => 'communication_style',
'optionEditPath' => 'civicrm/admin/options/communication_style',
],
+ 'is_core_field' => TRUE,
],
'email_greeting_id' => [
'name' => 'email_greeting_id',
'type' => 1,
'title' => 'Email Greeting ID',
'description' => 'FK to civicrm_option_value.id, that has to be valid registered Email Greeting.',
+ 'where' => 'civicrm_contact.email_greeting_id',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'email_greeting',
+ 'optionEditPath' => 'civicrm/admin/options/email_greeting',
+ ],
+ 'is_core_field' => TRUE,
],
'email_greeting_custom' => [
'name' => 'email_greeting_custom',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 45,
],
+ 'is_core_field' => TRUE,
],
'email_greeting_display' => [
'name' => 'email_greeting_display',
'description' => 'Cache Email Greeting.',
'maxlength' => 255,
'size' => 45,
+ 'where' => 'civicrm_contact.email_greeting_display',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 255,
'size' => 45,
],
+ 'is_core_field' => TRUE,
],
'postal_greeting_id' => [
'name' => 'postal_greeting_id',
'type' => 1,
'title' => 'Postal Greeting ID',
'description' => 'FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.',
+ 'where' => 'civicrm_contact.postal_greeting_id',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'size' => 6,
'maxlength' => 14,
],
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'postal_greeting',
+ 'optionEditPath' => 'civicrm/admin/options/postal_greeting',
+ ],
+ 'is_core_field' => TRUE,
],
'postal_greeting_custom' => [
'name' => 'postal_greeting_custom',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 45,
],
+ 'is_core_field' => TRUE,
],
'postal_greeting_display' => [
'name' => 'postal_greeting_display',
'description' => 'Cache Postal greeting.',
'maxlength' => 255,
'size' => 45,
+ 'where' => 'civicrm_contact.postal_greeting_display',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 255,
'size' => 45,
],
+ 'is_core_field' => TRUE,
],
'addressee_id' => [
'name' => 'addressee_id',
'type' => 1,
'title' => 'Addressee ID',
'description' => 'FK to civicrm_option_value.id, that has to be valid registered Addressee.',
+ 'where' => 'civicrm_contact.addressee_id',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'addressee',
+ 'optionEditPath' => 'civicrm/admin/options/addressee',
+ ],
+ 'is_core_field' => TRUE,
],
'addressee_custom' => [
'name' => 'addressee_custom',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 45,
],
+ 'is_core_field' => TRUE,
],
'addressee_display' => [
'name' => 'addressee_display',
'description' => 'Cache Addressee.',
'maxlength' => 255,
'size' => 45,
+ 'where' => 'civicrm_contact.addressee_display',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 255,
'size' => 45,
],
+ 'is_core_field' => TRUE,
],
'job_title' => [
'name' => 'job_title',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 255,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'gender_id' => [
'name' => 'gender_id',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'size' => 6,
'optionGroupName' => 'gender',
'optionEditPath' => 'civicrm/admin/options/gender',
],
+ 'is_core_field' => TRUE,
'api.aliases' => [
'0' => 'gender',
],
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select Date',
- 'format' => 'birth',
+ 'formatType' => 'birth',
],
+ 'is_core_field' => TRUE,
],
'is_deceased' => [
'name' => 'is_deceased',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
],
'deceased_date' => [
'name' => 'deceased_date',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Select Date',
- 'format' => 'birth',
+ 'formatType' => 'birth',
],
+ 'is_core_field' => TRUE,
],
'household_name' => [
'name' => 'household_name',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'primary_contact_id' => [
'name' => 'primary_contact_id',
'type' => 1,
'title' => 'Household Primary Contact ID',
'description' => 'Optional FK to Primary Contact for this household.',
+ 'where' => 'civicrm_contact.primary_contact_id',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
'html' => [
'type' => 'Select',
'size' => 6,
'maxlength' => 14,
],
+ 'is_core_field' => TRUE,
'FKApiName' => 'Contact',
],
'organization_name' => [
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'sic_code' => [
'name' => 'sic_code',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 8,
'size' => 8,
],
+ 'is_core_field' => TRUE,
],
'user_unique_id' => [
'name' => 'user_unique_id',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 255,
'size' => 45,
],
+ 'is_core_field' => TRUE,
],
'created_date' => [
'name' => 'created_date',
'title' => 'Created Date',
'description' => 'When was the contact was created.',
'required' => '',
- 'export' => TRUE,
'where' => 'civicrm_contact.created_date',
+ 'export' => TRUE,
'default' => 'NULL',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'modified_date' => [
'name' => 'modified_date',
'title' => 'Modified Date',
'description' => 'When was the contact (or closely related entity) was created or modified or deleted.',
'required' => '',
- 'export' => TRUE,
'where' => 'civicrm_contact.modified_date',
+ 'export' => TRUE,
'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'source' => [
'name' => 'source',
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 255,
'size' => 30,
],
+ 'is_core_field' => TRUE,
'uniqueName' => 'contact_source',
],
'employer_id' => [
'type' => 1,
'title' => 'Current Employer',
'description' => 'OPTIONAL FK to civicrm_contact record.',
- 'export' => TRUE,
'where' => 'civicrm_contact.employer_id',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
'html' => [
'type' => 'EntityRef',
'size' => 6,
'maxlength' => 14,
],
+ 'is_core_field' => TRUE,
'uniqueName' => 'current_employer_id',
'FKApiName' => 'Contact',
],
'type' => 16,
'title' => 'Contact is in Trash',
'required' => TRUE,
- 'export' => TRUE,
'where' => 'civicrm_contact.is_deleted',
+ 'export' => TRUE,
'table_name' => 'civicrm_contact',
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'CheckBox',
],
+ 'is_core_field' => TRUE,
'uniqueName' => 'contact_is_deleted',
],
'custom_1' => [
+ 'id' => '1',
'label' => 'Our special field',
- 'groupTitle' => 'select_test_g',
+ 'headerPattern' => '//',
+ 'title' => 'Our special field',
+ 'custom_field_id' => '1',
+ 'groupTitle' => 'select_test_group',
'data_type' => 'String',
+ 'name' => 'custom_1',
+ 'type' => 2,
'html_type' => 'Select',
'default_value' => '',
'text_length' => '',
'extends_entity_column_id' => '',
'is_view' => 0,
'is_multiple' => 0,
- 'option_group_id' => '105',
+ 'option_group_id' => '110',
'date_format' => '',
'time_format' => '',
'is_required' => '1',
'table_name' => 'civicrm_value_select_test_g_1',
'column_name' => 'our_special_field_1',
+ 'where' => 'civicrm_value_select_test_g_1.our_special_field_1',
+ 'extends_table' => 'civicrm_contact',
+ 'search_table' => 'contact_a',
'pseudoconstant' => [
- 'optionGroupName' => 'our_special_field_20170207021937',
- 'optionEditPath' => 'civicrm/admin/options/our_special_field_20170207021937',
+ 'optionGroupName' => 'our_special_field_20190820191605',
+ 'optionEditPath' => 'civicrm/admin/options/our_special_field_20190820191605',
],
- 'name' => 'custom_1',
- 'title' => 'Our special field',
- 'type' => 2,
'options' => [
'1' => 'Label1',
'2' => 'Label2',
'type' => 16,
'name' => 'dupe_check',
],
+ 'skip_greeting_processing' => [
+ 'title' => 'Skip Greeting processing',
+ 'description' => 'Do not process greetings, (these can be done by scheduled job and there may be a preference to do so for performance reasons)',
+ 'type' => 16,
+ 'api.default' => 0,
+ 'name' => 'skip_greeting_processing',
+ ],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Contact.getmergedfrom API.
+ *
+ * @return array
+ * API result array
+ */
+function contact_getmergedfrom_example() {
+ $params = [
+ 'contact_id' => 4,
+ ];
+
+ try{
+ $result = civicrm_api3('Contact', 'getmergedfrom', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function contact_getmergedfrom_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 3,
+ 'values' => [
+ '3' => [
+ 'id' => '3',
+ ],
+ '5' => [
+ 'id' => '5',
+ ],
+ '6' => [
+ 'id' => '6',
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testMergedGet"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Contact.getmergedto API.
+ *
+ * @return array
+ * API result array
+ */
+function contact_getmergedto_example() {
+ $params = [
+ 'sequential' => 1,
+ 'contact_id' => 6,
+ ];
+
+ try{
+ $result = civicrm_api3('Contact', 'getmergedto', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function contact_getmergedto_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 4,
+ 'values' => [
+ '0' => [
+ 'id' => '4',
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testMergedGet"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contact_getsingle_example() {
$params = [
- 'id' => 17,
+ 'id' => 3,
];
try{
function contact_getsingle_expectedresult() {
$expectedResult = [
- 'contact_id' => '17',
+ 'contact_id' => '3',
'contact_type' => 'Individual',
'contact_sub_type' => '',
- 'sort_name' => '',
- 'display_name' => 'Test Contact',
- 'do_not_email' => '',
- 'do_not_phone' => '',
- 'do_not_mail' => '',
- 'do_not_sms' => '',
- 'do_not_trade' => '',
+ 'sort_name' => 'Contact, Test',
+ 'display_name' => 'Mr. Test Contact II',
+ 'do_not_email' => 0,
+ 'do_not_phone' => 0,
+ 'do_not_mail' => 0,
+ 'do_not_sms' => 0,
+ 'do_not_trade' => 0,
'is_opt_out' => 0,
'legal_identifier' => '',
'external_identifier' => '',
'legal_name' => '',
'image_URL' => '',
'preferred_communication_method' => '',
- 'preferred_language' => '',
- 'preferred_mail_format' => '',
+ 'preferred_language' => 'en_US',
+ 'preferred_mail_format' => 'Both',
'first_name' => 'Test',
- 'middle_name' => '',
+ 'middle_name' => 'J.',
'last_name' => 'Contact',
- 'prefix_id' => '',
- 'suffix_id' => '',
+ 'prefix_id' => '3',
+ 'suffix_id' => '3',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'phone_id' => '',
'phone_type_id' => '',
'phone' => '',
- 'email_id' => '',
- 'email' => '',
- 'on_hold' => '',
+ 'email_id' => '1',
+ 'email' => 'anthony_anderson@civicrm.org',
+ 'on_hold' => 0,
'im_id' => '',
'provider_id' => '',
'im' => '',
'worldregion_id' => '',
'world_region' => '',
- 'languages' => '',
- 'individual_prefix' => '',
- 'individual_suffix' => '',
- 'communication_style' => '',
+ 'languages' => 'English (United States)',
+ 'individual_prefix' => 'Mr.',
+ 'individual_suffix' => 'II',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'country' => '',
- 'id' => '17',
+ 'id' => '3',
];
return $expectedResult;
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Contact.getunique API.
+ *
+ * @return array
+ * API result array
+ */
+function contact_getunique_example() {
+ $params = [];
+
+ try{
+ $result = civicrm_api3('Contact', 'getunique', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function contact_getunique_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 'UI_external_identifier',
+ 'values' => [
+ 'UI_external_identifier' => [],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testContactGetUnique"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'languages' => 'English (United States)',
'individual_prefix' => '',
'individual_suffix' => '',
- 'communication_style' => '',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contact_get_example() {
$params = [
- 'id' => 10,
+ 'id' => 19,
'api.email.replace' => [
'values' => [
'0' => [
- 'location_type_id' => 20,
+ 'location_type_id' => 38,
'email' => '1-1@example.com',
'is_primary' => 1,
],
'1' => [
- 'location_type_id' => 20,
+ 'location_type_id' => 38,
'email' => '1-2@example.com',
'is_primary' => 0,
],
'2' => [
- 'location_type_id' => 20,
+ 'location_type_id' => 38,
'email' => '1-3@example.com',
'is_primary' => 0,
],
'3' => [
- 'location_type_id' => 21,
+ 'location_type_id' => 39,
'email' => '2-1@example.com',
'is_primary' => 0,
],
'4' => [
- 'location_type_id' => 21,
+ 'location_type_id' => 39,
'email' => '2-2@example.com',
'is_primary' => 0,
],
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 10,
+ 'id' => 19,
'values' => [
- '10' => [
- 'contact_id' => '10',
+ '19' => [
+ 'contact_id' => '19',
'contact_type' => 'Organization',
'contact_sub_type' => '',
'sort_name' => 'Unit Test Organization',
'prefix_id' => '',
'suffix_id' => '',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'im' => '',
'worldregion_id' => '',
'world_region' => '',
+ 'languages' => 'English (United States)',
'individual_prefix' => '',
'individual_suffix' => '',
- 'communication_style' => '',
+ 'communication_style' => 'Formal',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'country' => '',
- 'id' => '10',
+ 'id' => '19',
'api.email.replace' => [
'is_error' => 0,
'version' => 3,
'count' => 5,
'values' => [
'0' => [
- 'id' => '18',
- 'contact_id' => '10',
- 'location_type_id' => '20',
+ 'id' => '19',
+ 'contact_id' => '19',
+ 'location_type_id' => '38',
'email' => '1-1@example.com',
'is_primary' => '1',
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_html' => '',
],
'1' => [
- 'id' => '19',
- 'contact_id' => '10',
- 'location_type_id' => '20',
+ 'id' => '20',
+ 'contact_id' => '19',
+ 'location_type_id' => '38',
'email' => '1-2@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_html' => '',
],
'2' => [
- 'id' => '20',
- 'contact_id' => '10',
- 'location_type_id' => '20',
+ 'id' => '21',
+ 'contact_id' => '19',
+ 'location_type_id' => '38',
'email' => '1-3@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_html' => '',
],
'3' => [
- 'id' => '21',
- 'contact_id' => '10',
- 'location_type_id' => '21',
+ 'id' => '22',
+ 'contact_id' => '19',
+ 'location_type_id' => '39',
'email' => '2-1@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_html' => '',
],
'4' => [
- 'id' => '22',
- 'contact_id' => '10',
- 'location_type_id' => '21',
+ 'id' => '23',
+ 'contact_id' => '19',
+ 'location_type_id' => '39',
'email' => '2-2@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contribution_create_example() {
$params = [
- 'contact_id' => 28,
+ 'contact_id' => 31,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'net_amount' => '95',
'source' => 'SSF',
'contribution_status_id' => 1,
- 'honor_contact_id' => 29,
+ 'honor_contact_id' => 32,
];
try{
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '28',
+ 'contact_id' => '31',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '4',
'net_amount' => '95',
'trxn_id' => '',
'invoice_id' => '',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contribution_create_example() {
$params = [
- 'contact_id' => 22,
+ 'contact_id' => 25,
'receive_date' => '2012-01-01',
'total_amount' => '100',
'financial_type_id' => 1,
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '22',
+ 'contact_id' => '25',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '1',
'net_amount' => '90',
'trxn_id' => '12345',
'invoice_id' => '67890',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contribution_create_example() {
$params = [
- 'contact_id' => 24,
+ 'contact_id' => 27,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'contribution_status_id' => 1,
'soft_credit' => [
'1' => [
- 'contact_id' => 25,
+ 'contact_id' => 28,
'amount' => 50,
'soft_credit_type_id' => 3,
],
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '24',
+ 'contact_id' => '27',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '4',
'net_amount' => '95',
'trxn_id' => '',
'invoice_id' => '',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contribution_create_example() {
$params = [
- 'contact_id' => 26,
+ 'contact_id' => 29,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'net_amount' => '95',
'source' => 'SSF',
'contribution_status_id' => 1,
- 'soft_credit_to' => 27,
+ 'soft_credit_to' => 30,
];
try{
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '26',
+ 'contact_id' => '29',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '4',
'net_amount' => '95',
'trxn_id' => '',
'invoice_id' => '',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'net_amount' => '100',
'trxn_id' => '12345',
'invoice_id' => '67890',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
'tax_amount' => '',
'revenue_recognition_date' => '',
'contribution_type_id' => '1',
- 'invoice_number' => '',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contribution_create_example() {
$params = [
- 'contact_id' => 11,
+ 'contact_id' => 12,
'receive_date' => '20120511',
'total_amount' => '100',
'financial_type_id' => 1,
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '11',
+ 'contact_id' => '12',
'financial_type_id' => '1',
'contribution_page_id' => '',
'payment_instrument_id' => '1',
'net_amount' => '90',
'trxn_id' => '12345',
'invoice_id' => '67890',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'display_name' => 'Mr. Anthony Anderson II',
'contribution_id' => '1',
'currency' => 'USD',
+ 'contribution_recur_id' => '',
+ 'contribution_status_id' => '1',
+ 'contribution_campaign_id' => '',
+ 'payment_instrument_id' => '4',
'receive_date' => '2010-01-20 00:00:00',
'non_deductible_amount' => '10.00',
'total_amount' => '100.00',
'net_amount' => '95.00',
'trxn_id' => '23456',
'invoice_id' => '78910',
- 'cancel_date' => '',
+ 'invoice_number' => 'INV_1',
+ 'contribution_cancel_date' => '',
'cancel_reason' => '',
'receipt_date' => '',
'thankyou_date' => '',
'contribution_source' => 'SSF',
'amount_level' => '',
- 'contribution_recur_id' => '',
'is_test' => 0,
'is_pay_later' => 0,
- 'contribution_status_id' => '1',
'contribution_check_number' => '',
- 'contribution_campaign_id' => '',
- 'financial_type_id' => '1',
- 'financial_type' => 'Donation',
- 'product_id' => '',
- 'product_name' => '',
- 'sku' => '',
- 'contribution_product_id' => '',
- 'product_option' => '',
- 'fulfilled_date' => '',
- 'contribution_start_date' => '',
- 'contribution_end_date' => '',
'financial_account_id' => '1',
'accounting_code' => '4200',
'campaign_id' => '',
'contribution_campaign_title' => '',
+ 'financial_type_id' => '1',
+ 'financial_type' => 'Donation',
'contribution_note' => '',
'contribution_batch' => '',
- 'contribution_status' => 'Completed',
+ 'contribution_recur_status' => 'Completed',
'payment_instrument' => 'Check',
- 'payment_instrument_id' => '4',
- 'instrument_id' => '4',
+ 'contribution_status' => 'Completed',
'check_number' => '',
+ 'instrument_id' => '4',
+ 'cancel_date' => '',
'id' => '1',
'contribution_type_id' => '1',
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Contribution.getunique API.
+ *
+ * @return array
+ * API result array
+ */
+function contribution_getunique_example() {
+ $params = [];
+
+ try{
+ $result = civicrm_api3('Contribution', 'getunique', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function contribution_getunique_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 2,
+ 'values' => [
+ 'UI_contrib_trxn_id' => [],
+ 'UI_contrib_invoice_id' => [],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testContributionGetUnique"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
'campaign_id' => '',
'is_share' => '',
'is_billing_required' => '',
+ 'contribution_type_id' => '1',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
],
'cvv2' => 123,
'pledge_id' => '1',
- 'cid' => '83',
- 'contact_id' => '83',
+ 'cid' => '4',
+ 'contact_id' => '4',
'amount' => '100',
'is_pledge' => TRUE,
- 'pledge_block_id' => 2,
+ 'pledge_block_id' => 1,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'create_date' => '20120130621222105',
'modified_date' => '2012-11-14 16:02:35',
'cancel_date' => '',
+ 'cancel_reason' => '',
'end_date' => '',
'processor_id' => '',
'payment_token_id' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionSoftTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function contribution_soft_delete_expectedresult() {
- $expectedResult = '';
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => 1,
+ ];
return $expectedResult;
}
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionSoftTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionSoftTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'created_id' => '',
'created_date' => '',
'is_reserved' => '',
+ 'is_public' => '',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_multiple' => 0,
'collapse_adv_display' => 0,
'is_reserved' => 0,
+ 'is_public' => '1',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CustomGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'name' => 'A-team domain',
'description' => 'domain of chaos',
'domain_version' => '4.2',
- 'contact_id' => 6,
+ 'contact_id' => 7,
];
try{
'name' => 'A-team domain',
'description' => 'domain of chaos',
'config_backend' => '',
- 'contact_id' => '6',
+ 'contact_id' => '7',
'locales' => '',
'locale_custom_strings' => '',
'domain_version' => '4.2',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/DomainTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'geo_code_1' => '',
'geo_code_2' => '',
],
- 'from_email' => 'info@EXAMPLE.ORG',
'from_name' => 'FIXME',
+ 'from_email' => 'info@EXAMPLE.ORG',
'domain_version' => '4.6.alpha1',
],
'1' => [
'geo_code_1' => '41.8328',
'geo_code_2' => '-72.9253',
],
- 'from_email' => 'info@EXAMPLE.ORG',
'from_name' => 'FIXME',
+ 'from_email' => 'info@EXAMPLE.ORG',
'domain_version' => '4.6.alpha1',
],
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/DomainTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function email_create_example() {
$params = [
- 'contact_id' => 3,
- 'location_type_id' => 6,
+ 'contact_id' => 23,
'email' => 'api@a-team.com',
- 'is_primary' => 1,
+ 'on_hold' => '2',
];
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 3,
+ 'id' => 26,
'values' => [
- '3' => [
- 'id' => '3',
- 'contact_id' => '3',
- 'location_type_id' => '6',
+ '26' => [
+ 'id' => '26',
+ 'contact_id' => '23',
+ 'location_type_id' => '1',
'email' => 'api@a-team.com',
'is_primary' => '1',
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => '2',
'is_bulkmail' => '',
- 'hold_date' => '',
+ 'hold_date' => '20190820191652',
'reset_date' => '',
'signature_text' => '',
'signature_html' => '',
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testCreateEmail"
+* The test that created it is called "testEmailOnHold"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function email_delete_example() {
$params = [
- 'id' => 11,
+ 'id' => 12,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function email_replace_example() {
$params = [
- 'contact_id' => 9,
+ 'contact_id' => 17,
'values' => [
'0' => [
- 'location_type_id' => 18,
+ 'location_type_id' => 34,
'email' => '1-1@example.com',
'is_primary' => 1,
],
'1' => [
- 'location_type_id' => 18,
+ 'location_type_id' => 34,
'email' => '1-2@example.com',
'is_primary' => 0,
],
'2' => [
- 'location_type_id' => 18,
+ 'location_type_id' => 34,
'email' => '1-3@example.com',
'is_primary' => 0,
],
'3' => [
- 'location_type_id' => 19,
+ 'location_type_id' => 35,
'email' => '2-1@example.com',
'is_primary' => 0,
],
'4' => [
- 'location_type_id' => 19,
+ 'location_type_id' => 35,
'email' => '2-2@example.com',
'is_primary' => 0,
],
'version' => 3,
'count' => 5,
'values' => [
- '12' => [
- 'id' => '12',
- 'contact_id' => '9',
- 'location_type_id' => '18',
+ '13' => [
+ 'id' => '13',
+ 'contact_id' => '17',
+ 'location_type_id' => '34',
'email' => '1-1@example.com',
'is_primary' => '1',
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_text' => '',
'signature_html' => '',
],
- '13' => [
- 'id' => '13',
- 'contact_id' => '9',
- 'location_type_id' => '18',
+ '14' => [
+ 'id' => '14',
+ 'contact_id' => '17',
+ 'location_type_id' => '34',
'email' => '1-2@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_text' => '',
'signature_html' => '',
],
- '14' => [
- 'id' => '14',
- 'contact_id' => '9',
- 'location_type_id' => '18',
+ '15' => [
+ 'id' => '15',
+ 'contact_id' => '17',
+ 'location_type_id' => '34',
'email' => '1-3@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_text' => '',
'signature_html' => '',
],
- '15' => [
- 'id' => '15',
- 'contact_id' => '9',
- 'location_type_id' => '19',
+ '16' => [
+ 'id' => '16',
+ 'contact_id' => '17',
+ 'location_type_id' => '35',
'email' => '2-1@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
'signature_text' => '',
'signature_html' => '',
],
- '16' => [
- 'id' => '16',
- 'contact_id' => '9',
- 'location_type_id' => '19',
+ '17' => [
+ 'id' => '17',
+ 'contact_id' => '17',
+ 'location_type_id' => '35',
'email' => '2-2@example.com',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EmailTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityBatchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityBatchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityBatchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function entity_tag_delete_example() {
$params = [
- 'contact_id_h' => 31,
- 'tag_id' => '15',
+ 'contact_id_h' => 43,
+ 'tag_id' => '19',
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityTagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function entity_tag_get_example() {
$params = [
- 'contact_id' => 15,
+ 'contact_id' => 18,
];
try{
'5' => [
'id' => '5',
'entity_table' => 'civicrm_contact',
- 'entity_id' => '15',
- 'tag_id' => '10',
+ 'entity_id' => '18',
+ 'tag_id' => '11',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EntityTagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'allow_selfcancelxfer' => 0,
'selfcancelxfer_time' => 0,
'is_template' => 0,
- 'created_date' => '2017-02-07 02:22:22',
+ 'created_date' => '2019-08-20 19:17:20',
'is_share' => '1',
'is_confirm_enabled' => '1',
'is_billing_required' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/EventTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GrantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GrantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '5',
+ 'contact_id' => '3',
'application_received_date' => '20130728084957',
'decision_date' => '20130805000000',
'grant_type_id' => '1',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GrantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 4,
+ 'id' => 1,
'values' => [
- '4' => [
- 'id' => '4',
+ '1' => [
+ 'id' => '1',
'name' => 'Test Group 1',
'title' => 'New Test Group Created',
'description' => 'New Test Group Created',
'is_active' => '1',
'visibility' => 'Public Pages',
- 'where_clause' => ' ( `civicrm_group_contact-4`.group_id IN ( 4 ) ) ',
- 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:25:\"`civicrm_group_contact-4`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-4` ON (contact_a.id = `civicrm_group_contact-4`.contact_id AND `civicrm_group_contact-4`.status IN (\'Added\'))\";}',
- 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:25:\"`civicrm_group_contact-4`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-4` ON (contact_a.id = `civicrm_group_contact-4`.contact_id AND `civicrm_group_contact-4`.status IN (\'Added\'))\";}',
+ 'where_clause' => ' ( ( ( `civicrm_group_contact-5d5bbacea0631`.group_id IN (\"1\") ) ) ) ',
+ 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:37:\"`civicrm_group_contact-5d5bbacea0631`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbacea0631` ON (contact_a.id = `civicrm_group_contact-5d5bbacea0631`.contact_id AND `civicrm_group_contact-5d5bbacea0631`.status IN (\'Added\'))\";}',
+ 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:37:\"`civicrm_group_contact-5d5bbacea0631`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbacea0631` ON (contact_a.id = `civicrm_group_contact-5d5bbacea0631`.contact_id AND `civicrm_group_contact-5d5bbacea0631`.status IN (\'Added\'))\";}',
'group_type' => [
'0' => '1',
'1' => '2',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'title' => 'Group ID',
'description' => 'Group ID',
'required' => TRUE,
+ 'where' => 'civicrm_group.id',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
'api.aliases' => [
'0' => 'group_id',
],
'description' => 'Internal name of Group.',
'maxlength' => 64,
'size' => 30,
+ 'where' => 'civicrm_group.name',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'title' => [
'name' => 'title',
'description' => 'Name of Group.',
'maxlength' => 64,
'size' => 30,
+ 'where' => 'civicrm_group.title',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 1,
+ 'html' => [
+ 'type' => 'Text',
+ 'maxlength' => 64,
+ 'size' => 30,
+ ],
+ 'is_core_field' => TRUE,
'api.required' => 1,
],
'description' => [
'description' => 'Optional verbose description of the group.',
'rows' => 2,
'cols' => 60,
+ 'where' => 'civicrm_group.description',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
'html' => [
'type' => 'TextArea',
'rows' => 2,
'cols' => 60,
],
+ 'is_core_field' => TRUE,
],
'source' => [
'name' => 'source',
'description' => 'Module or process which created this group.',
'maxlength' => 64,
'size' => 30,
+ 'where' => 'civicrm_group.source',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'saved_search_id' => [
'name' => 'saved_search_id',
'type' => 1,
'title' => 'Saved Search ID',
'description' => 'FK to saved search table.',
+ 'where' => 'civicrm_group.saved_search_id',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_SavedSearch',
+ 'is_core_field' => TRUE,
'FKApiName' => 'SavedSearch',
],
'is_active' => [
'type' => 16,
'title' => 'Group Enabled',
'description' => 'Is this entry active?',
+ 'where' => 'civicrm_group.is_active',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
'api.default' => 1,
],
'visibility' => [
'description' => 'In what context(s) is this field visible.',
'maxlength' => 24,
'size' => 20,
+ 'where' => 'civicrm_group.visibility',
'default' => 'User and User Admin Only',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'maxlength' => 24,
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::groupVisibility',
],
+ 'is_core_field' => TRUE,
],
'where_clause' => [
'name' => 'where_clause',
'type' => 32,
'title' => 'Group Where Clause',
'description' => 'the sql where clause if a saved search acl',
+ 'where' => 'civicrm_group.where_clause',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'select_tables' => [
'name' => 'select_tables',
'type' => 32,
'title' => 'Tables For Select Clause',
'description' => 'the tables to be included in a select data',
+ 'where' => 'civicrm_group.select_tables',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'serialize' => 4,
+ 'is_core_field' => TRUE,
],
'where_tables' => [
'name' => 'where_tables',
'type' => 32,
'title' => 'Tables For Where Clause',
'description' => 'the tables to be included in the count statement',
+ 'where' => 'civicrm_group.where_tables',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'serialize' => 4,
+ 'is_core_field' => TRUE,
],
'group_type' => [
'name' => 'group_type',
'description' => 'FK to group type',
'maxlength' => 128,
'size' => 45,
+ 'where' => 'civicrm_group.group_type',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'serialize' => 1,
'pseudoconstant' => [
'optionGroupName' => 'group_type',
'optionEditPath' => 'civicrm/admin/options/group_type',
],
+ 'is_core_field' => TRUE,
],
'cache_date' => [
'name' => 'cache_date',
'title' => 'Group Cache Date',
'description' => 'Date when we created the cache for a smart group',
'required' => '',
+ 'where' => 'civicrm_group.cache_date',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'refresh_date' => [
'name' => 'refresh_date',
'title' => 'Next Group Refresh Time',
'description' => 'Date and time when we need to refresh the cache next.',
'required' => '',
+ 'where' => 'civicrm_group.refresh_date',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'parents' => [
'name' => 'parents',
'type' => 32,
'title' => 'Group Parents',
'description' => 'IDs of the parent(s)',
+ 'where' => 'civicrm_group.parents',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'serialize' => 5,
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_PseudoConstant::allGroup',
+ ],
+ 'is_core_field' => TRUE,
],
'children' => [
'name' => 'children',
'type' => 32,
'title' => 'Group Children',
'description' => 'IDs of the child(ren)',
+ 'where' => 'civicrm_group.children',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'is_hidden' => [
'name' => 'is_hidden',
'type' => 16,
'title' => 'Group is Hidden',
'description' => 'Is this group hidden?',
+ 'where' => 'civicrm_group.is_hidden',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'is_reserved' => [
'name' => 'is_reserved',
'type' => 16,
'title' => 'Group is Reserved',
+ 'where' => 'civicrm_group.is_reserved',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'created_id' => [
'name' => 'created_id',
'type' => 1,
'title' => 'Group Created By',
'description' => 'FK to contact table.',
+ 'where' => 'civicrm_group.created_id',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'is_core_field' => TRUE,
'FKApiName' => 'Contact',
],
'modified_id' => [
'type' => 1,
'title' => 'Group Modified By',
'description' => 'FK to contact table.',
+ 'where' => 'civicrm_group.modified_id',
'table_name' => 'civicrm_group',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'is_core_field' => TRUE,
'FKApiName' => 'Contact',
],
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'description' => 'New Test Group Created',
'is_active' => '1',
'visibility' => 'Public Pages',
- 'where_clause' => ' ( `civicrm_group_contact-3`.group_id IN ( 3 ) ) ',
- 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:25:\"`civicrm_group_contact-3`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-3` ON (contact_a.id = `civicrm_group_contact-3`.contact_id AND `civicrm_group_contact-3`.status IN (\'Added\'))\";}',
- 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:25:\"`civicrm_group_contact-3`\";s:165:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-3` ON (contact_a.id = `civicrm_group_contact-3`.contact_id AND `civicrm_group_contact-3`.status IN (\'Added\'))\";}',
+ 'where_clause' => ' ( ( ( `civicrm_group_contact-5d5bbabeb0cbd`.group_id IN (\"3\") ) ) ) ',
+ 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:37:\"`civicrm_group_contact-5d5bbabeb0cbd`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbabeb0cbd` ON (contact_a.id = `civicrm_group_contact-5d5bbabeb0cbd`.contact_id AND `civicrm_group_contact-5d5bbabeb0cbd`.status IN (\'Added\'))\";}',
+ 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:37:\"`civicrm_group_contact-5d5bbabeb0cbd`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbabeb0cbd` ON (contact_a.id = `civicrm_group_contact-5d5bbabeb0cbd`.contact_id AND `civicrm_group_contact-5d5bbabeb0cbd`.status IN (\'Added\'))\";}',
'group_type' => [
'0' => '1',
'1' => '2',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 'is_error',
+ 'id' => 2,
'values' => [
- 'is_error' => 0,
+ '2' => [
+ 'id' => '2',
+ 'child_group_id' => '3',
+ 'parent_group_id' => '1',
+ ],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupNestingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupNestingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupNestingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 3,
+ 'count' => 1,
'id' => 3,
'values' => [
- 'id' => '3',
- 'group_id' => '6',
- 'organization_id' => '8',
+ '3' => [
+ 'id' => '3',
+ 'group_id' => '6',
+ 'organization_id' => '8',
+ ],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupOrganizationTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupOrganizationTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupOrganizationTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function im_create_example() {
$params = [
- 'contact_id' => 3,
+ 'contact_id' => 5,
'name' => 'My Yahoo IM Handle',
- 'location_type_id' => 1,
'provider_id' => 1,
];
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 1,
+ 'id' => 2,
'values' => [
- '1' => [
- 'id' => '1',
- 'contact_id' => '3',
+ '2' => [
+ 'id' => '2',
+ 'contact_id' => '5',
'location_type_id' => '1',
'name' => 'My Yahoo IM Handle',
'provider_id' => '1',
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testCreateIm"
+* The test that created it is called "testCreateImDefaultLocation"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ImTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function im_delete_example() {
$params = [
- 'id' => 3,
+ 'id' => 4,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ImTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function im_get_example() {
$params = [
- 'contact_id' => 4,
+ 'contact_id' => 7,
'name' => 'My Yahoo IM Handle',
'location_type_id' => 1,
'provider_id' => 1,
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 3,
'values' => [
- '2' => [
- 'id' => '2',
- 'contact_id' => '4',
+ '3' => [
+ 'id' => '3',
+ 'contact_id' => '7',
'location_type_id' => '1',
'name' => 'My Yahoo IM Handle',
'provider_id' => '1',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ImTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Job.clone API.
+ *
+ * @return array
+ * API result array
+ */
+function job_clone_example() {
+ $params = [
+ 'id' => 31,
+ ];
+
+ try{
+ $result = civicrm_api3('Job', 'clone', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function job_clone_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 32,
+ 'values' => [
+ '32' => [
+ 'id' => '32',
+ 'domain_id' => '1',
+ 'run_frequency' => 'Daily',
+ 'name' => 'API_Test_Job - Copy',
+ 'description' => 'A long description written by hand in cursive',
+ 'api_entity' => 'ApiTestEntity',
+ 'api_action' => 'apitestaction',
+ 'parameters' => 'Semi-formal explanation of runtime job parameters',
+ 'is_active' => '1',
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testClone"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/JobTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/JobTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function job_delete_example() {
$params = [
- 'id' => 31,
+ 'id' => 33,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/JobTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LineItemTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LineItemTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LineItemTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'email' => 'test2@loc.block',
'is_primary' => 0,
'is_billing' => '',
- 'on_hold' => '',
+ 'on_hold' => 0,
'is_bulkmail' => '',
'hold_date' => '',
'reset_date' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'from' => 'Anderson, Anthony',
'to' => 'Dwarf, Dopey',
'table' => 'civicrm_contact',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:24',
'log_conn_id' => 'wooty wop wop',
],
'1' => [
'from' => 'Mr. Anthony Anderson II',
'to' => 'Mr. Dopey Dwarf II',
'table' => 'civicrm_contact',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:24',
'log_conn_id' => 'wooty wop wop',
],
'2' => [
'from' => 'Anthony',
'to' => 'Dopey',
'table' => 'civicrm_contact',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:24',
'log_conn_id' => 'wooty wop wop',
],
'3' => [
'from' => 'Anderson',
'to' => 'Dwarf',
'table' => 'civicrm_contact',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:24',
'log_conn_id' => 'wooty wop wop',
],
'4' => [
'action' => 'Update',
'id' => '3',
'field' => 'modified_date',
- 'from' => '2017-02-07 02:36:28',
- 'to' => '2017-02-07 02:36:46',
+ 'from' => '2019-08-20 19:23:20',
+ 'to' => '2019-08-20 19:23:24',
'table' => 'civicrm_contact',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:24',
'log_conn_id' => 'wooty wop wop',
],
'5' => [
'from' => '',
'to' => '2',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'6' => [
'from' => '',
'to' => '3',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'7' => [
'id' => '2',
'field' => 'location_type_id',
'from' => '',
- 'to' => '',
+ 'to' => '1',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'8' => [
'from' => '',
'to' => 'dopey@mail.com',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'9' => [
'from' => '',
'to' => 0,
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'10' => [
'from' => '',
'to' => 0,
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'11' => [
'from' => '',
'to' => 0,
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'12' => [
'from' => '',
'to' => 0,
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'13' => [
'from' => '',
'to' => '',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'14' => [
'from' => '',
'to' => '',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'15' => [
'from' => '',
'to' => '',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
'16' => [
'from' => '',
'to' => '',
'table' => 'civicrm_email',
- 'log_date' => '2017-02-07 02:36:46',
+ 'log_date' => '2019-08-20 19:23:25',
'log_conn_id' => 'wooty wop wop',
],
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LoggingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
function logging_revert_example() {
$params = [
'log_conn_id' => 'woot',
- 'log_date' => '2017-02-07 02:35:06',
+ 'log_date' => '2019-08-20 19:22:48',
];
try{
/*
* This example has been generated from the API test suite.
-* The test that created it is called "/Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/tests/phpunit/api/v3/LoggingTest.php"
+* The test that created it is called "/home/seamus/buildkit/build/47-test/sites/all/modules/civicrm/tests/phpunit/api/v3/LoggingTest.php"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/Revert
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function mail_settings_get_example() {
$params = [
- 'title' => 'MailSettings title',
+ 'name' => 'delete this setting',
'api.MailSettings.delete' => 1,
];
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 2,
+ 'count' => 1,
+ 'id' => 6,
'values' => [
- '1' => [
- 'id' => '1',
- 'domain_id' => '1',
- 'name' => 'default',
- 'is_default' => 0,
- 'domain' => 'EXAMPLE.ORG',
- 'api.MailSettings.delete' => [
- 'is_error' => 0,
- 'version' => 3,
- 'count' => 1,
- 'values' => 1,
- ],
- ],
'6' => [
'id' => '6',
'domain_id' => '1',
- 'name' => 'my mail setting',
+ 'name' => 'delete this setting',
'is_default' => '1',
'domain' => 'setting.com',
+ 'localpart' => 'civicrm+',
'server' => 'localhost',
'username' => 'sue',
'password' => 'pass',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'domain_id' => 1,
'name' => 'my mail setting',
'domain' => 'setting.com',
- 'local_part' => 'civicrm+',
+ 'localpart' => 'civicrm+',
'server' => 'localhost',
'username' => 'sue',
'password' => 'pass',
'name' => 'my mail setting',
'is_default' => '1',
'domain' => 'setting.com',
- 'localpart' => '',
+ 'localpart' => 'civicrm+',
'return_path' => '',
'protocol' => '',
'server' => 'localhost',
'password' => 'pass',
'is_ssl' => '',
'source' => '',
+ 'activity_status' => '',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'domain_id' => 1,
'name' => 'my mail setting',
'domain' => 'setting.com',
- 'local_part' => 'civicrm+',
+ 'localpart' => 'civicrm+',
'server' => 'localhost',
'username' => 'sue',
'password' => 'pass',
'name' => 'my mail setting',
'is_default' => '1',
'domain' => 'setting.com',
+ 'localpart' => 'civicrm+',
'server' => 'localhost',
'username' => 'sue',
'password' => 'pass',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailSettingsTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function mailing_clone_example() {
$params = [
- 'id' => 21,
+ 'id' => 27,
];
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 22,
+ 'id' => 28,
'values' => [
- '22' => [
- 'id' => '22',
+ '28' => [
+ 'id' => '28',
'domain_id' => '1',
'header_id' => '1',
'footer_id' => '2',
'body_text' => 'This is {contact.display_name}.
https://civicrm.org
{domain.address}{action.optOutUrl}',
- 'body_html' => '<p>This is {contact.display_name}.</p><p><a href=\'https://civicrm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
+ 'body_html' => '<link href=\'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Zilla+Slab:500,700\' rel=\'stylesheet\' type=\'text/css\'><p><a href=\"http://{action.forward}\">Forward this email</a><a href=\"{action.forward}\">Forward this email with no protocol</a></p<p>This is {contact.display_name}.</p><p><a href=\'https://civicrm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
'url_tracking' => '1',
'forward_replies' => 0,
'auto_responder' => 0,
'is_completed' => '',
'msg_template_id' => '',
'override_verp' => '1',
- 'created_id' => '147',
+ 'created_id' => '154',
'created_date' => '2013-07-28 08:49:19',
+ 'modified_date' => '2012-11-14 16:02:35',
'scheduled_id' => '',
'scheduled_date' => '',
'approver_id' => '',
'approval_date' => '',
'approval_status_id' => '',
'approval_note' => '',
- 'is_archived' => '',
+ 'is_archived' => 0,
'visibility' => 'Public Pages',
'campaign_id' => '',
'dedupe_email' => '1',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'body_text' => 'This is {contact.display_name}.
https://civicrm.org
{domain.address}{action.optOutUrl}',
- 'body_html' => '<p>This is {contact.display_name}.</p><p><a href=\'https://civicrm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
+ 'body_html' => '<link href=\'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Zilla+Slab:500,700\' rel=\'stylesheet\' type=\'text/css\'><p><a href=\"http://{action.forward}\">Forward this email</a><a href=\"{action.forward}\">Forward this email with no protocol</a></p<p>This is {contact.display_name}.</p><p><a href=\'https://civicrm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
'name' => 'mailing name',
- 'created_id' => 3,
+ 'created_id' => 15,
'header_id' => '',
'footer_id' => '',
'groups' => [
'include' => [
- '0' => 2,
+ '0' => 13,
],
'exclude' => [
- '0' => 3,
+ '0' => 14,
],
],
'mailings' => [
'options' => [
'force_rollback' => 1,
],
- 'api.mailing_job.create' => 1,
'api.MailingRecipients.get' => [
'mailing_id' => '$value.id',
'api.contact.getvalue' => [
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 1,
+ 'id' => 9,
'values' => [
- '1' => [
- 'id' => '1',
+ '9' => [
+ 'id' => '9',
'domain_id' => '1',
'header_id' => '',
'footer_id' => '',
'from_name' => 'FIXME',
'from_email' => 'info@EXAMPLE.ORG',
'replyto_email' => 'info@EXAMPLE.ORG',
- 'template_type' => '',
+ 'template_type' => 'traditional',
'template_options' => '',
'subject' => 'Hello {contact.display_name}',
'body_text' => 'This is {contact.display_name}.
https://civicrm.org
{domain.address}{action.optOutUrl}',
- 'body_html' => '<p>This is {contact.display_name}.</p><p><a href=\'https://civicrm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
+ 'body_html' => '<link href=\'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Zilla+Slab:500,700\' rel=\'stylesheet\' type=\'text/css\'><p><a href=\"http://{action.forward}\">Forward this email</a><a href=\"{action.forward}\">Forward this email with no protocol</a></p<p>This is {contact.display_name}.</p><p><a href=\'https://civicrm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
'url_tracking' => '1',
- 'forward_replies' => '',
- 'auto_responder' => '',
+ 'forward_replies' => 0,
+ 'auto_responder' => 0,
'open_tracking' => '1',
'is_completed' => '',
'msg_template_id' => '',
'override_verp' => '1',
- 'created_id' => '3',
+ 'created_id' => '15',
'created_date' => '2013-07-28 08:49:19',
+ 'modified_date' => '2012-11-14 16:02:35',
'scheduled_id' => '',
'scheduled_date' => '',
'approver_id' => '',
'approval_date' => '',
'approval_status_id' => '',
'approval_note' => '',
- 'is_archived' => '',
+ 'is_archived' => 0,
'visibility' => 'Public Pages',
'campaign_id' => '',
'dedupe_email' => '1',
'sms_provider_id' => '',
'hash' => '',
'location_type_id' => '',
- 'email_selection_method' => '',
+ 'email_selection_method' => 'automatic',
'language' => '',
- 'api.mailing_job.create' => [
- 'is_error' => 0,
- 'version' => 3,
- 'count' => 1,
- 'id' => 1,
- 'values' => [
- '0' => [
- 'id' => '1',
- 'mailing_id' => '1',
- 'scheduled_date' => '20130728085413',
- 'start_date' => '',
- 'end_date' => '',
- 'status' => 'Scheduled',
- 'is_test' => 0,
- 'job_type' => '',
- 'parent_id' => '',
- 'job_offset' => '',
- 'job_limit' => '',
- ],
- ],
- ],
'api.MailingRecipients.get' => [
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 1,
+ 'id' => 4,
'values' => [
'0' => [
- 'id' => '1',
- 'mailing_id' => '1',
- 'contact_id' => '4',
- 'email_id' => '4',
+ 'id' => '4',
+ 'mailing_id' => '9',
+ 'contact_id' => '16',
+ 'email_id' => '16',
'api.contact.getvalue' => 'Mr. Includer Person II',
'api.email.getvalue' => 'include.me@example.org',
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function mailing_delete_example() {
$params = [
- 'id' => 20,
+ 'id' => 26,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 82,
+ 'count' => 88,
'values' => [
'{action.unsubscribe}' => 'Unsubscribe via email',
'{action.unsubscribeUrl}' => 'Unsubscribe via web page',
'{contact.individual_suffix}' => 'Individual Suffix',
'{contact.formal_title}' => 'Formal Title',
'{contact.communication_style}' => 'Communication Style',
+ '{contact.email_greeting_id}' => 'Email Greeting ID',
+ '{contact.postal_greeting_id}' => 'Postal Greeting ID',
+ '{contact.addressee_id}' => 'Addressee ID',
'{contact.job_title}' => 'Job Title',
'{contact.gender}' => 'Gender',
'{contact.birth_date}' => 'Birth Date',
'{contact.postal_code}' => 'Postal Code',
'{contact.geo_code_1}' => 'Latitude',
'{contact.geo_code_2}' => 'Longitude',
+ '{contact.manual_geo_code}' => 'Is Manually Geocoded',
'{contact.address_name}' => 'Address Name',
'{contact.master_id}' => 'Master Address Belongs To',
'{contact.county}' => 'County',
'{contact.country}' => 'Country',
'{contact.phone}' => 'Phone',
'{contact.phone_ext}' => 'Phone Extension',
+ '{contact.phone_type_id}' => 'Phone Type',
'{contact.email}' => 'Email',
'{contact.on_hold}' => 'On Hold',
'{contact.signature_text}' => 'Signature Text',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$params = [
'scheduled_date' => '2014-12-13 10:00:00',
'approval_date' => '2014-12-13 00:00:00',
- 'id' => 18,
+ 'id' => 22,
];
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 18,
+ 'id' => 22,
'values' => [
- '18' => [
- 'id' => '18',
+ '22' => [
+ 'id' => '22',
'domain_id' => '1',
'header_id' => '',
- 'footer_id' => '27',
+ 'footer_id' => '31',
'reply_id' => '8',
'unsubscribe_id' => '5',
'resubscribe_id' => '6',
'is_completed' => '',
'msg_template_id' => '',
'override_verp' => '1',
- 'created_id' => '40',
+ 'created_id' => '45',
'created_date' => '2013-07-28 08:49:19',
- 'scheduled_id' => '41',
+ 'modified_date' => '2012-11-14 16:02:35',
+ 'scheduled_id' => '46',
'scheduled_date' => '20130728085413',
- 'approver_id' => '41',
+ 'approver_id' => '46',
'approval_date' => '20130728085413',
'approval_status_id' => '1',
'approval_note' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'testing_criteria' => 'subject',
'winner_criteria' => 'open',
'specific_url' => '',
- 'declare_winning_time' => '20170209023708',
+ 'declare_winning_time' => '20190822192332',
'group_percentage' => '10',
'created_id' => '3',
'created_date' => '2013-07-28 08:49:19',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingABTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MappingFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function membership_create_example() {
$params = [
- 'contact_id' => 79,
- 'membership_type_id' => 47,
+ 'contact_id' => 3,
+ 'membership_type_id' => 1,
'join_date' => '2006-01-21',
'start_date' => '2006-01-21',
'end_date' => '2006-12-21',
'source' => 'Payment',
'is_override' => 1,
- 'status_id' => 30,
+ 'status_id' => 31,
];
try{
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '79',
- 'membership_type_id' => '47',
+ 'contact_id' => '3',
+ 'membership_type_id' => '1',
'join_date' => '20060121000000',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '30',
+ 'status_id' => '31',
'is_override' => '1',
+ 'status_override_end_date' => '',
'owner_membership_id' => '',
'max_related' => '',
'is_test' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function membership_create_example() {
$params = [
- 'contact_id' => 91,
- 'membership_type_id' => 55,
+ 'contact_id' => 3,
+ 'membership_type_id' => 1,
'join_date' => '2009-01-21',
'start_date' => '2009-01-21',
'end_date' => '2009-12-21',
'source' => 'Payment',
'is_override' => 1,
- 'status_id' => 34,
+ 'status_id' => 35,
'custom_1' => 'custom string',
];
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '91',
- 'membership_type_id' => '55',
+ 'contact_id' => '3',
+ 'membership_type_id' => '1',
'join_date' => '20090121000000',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '34',
+ 'status_id' => '35',
'is_override' => '1',
+ 'status_override_end_date' => '',
'owner_membership_id' => '',
'max_related' => '',
'is_test' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function membership_get_example() {
$params = [
- 'contact_id' => 47,
+ 'contact_id' => 3,
'filters' => [
'is_current' => 1,
],
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '47',
- 'membership_type_id' => '29',
+ 'contact_id' => '3',
+ 'membership_type_id' => '1',
'join_date' => '2009-01-21',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '22',
+ 'status_id' => '23',
'is_override' => '1',
'is_test' => 0,
'is_pay_later' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function membership_get_example() {
$params = [
- 'membership_type_id' => 23,
+ 'membership_type_id' => 1,
];
try{
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '38',
- 'membership_type_id' => '23',
+ 'contact_id' => '3',
+ 'membership_type_id' => '1',
'join_date' => '2009-01-21',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '19',
+ 'status_id' => '20',
'is_override' => '1',
'is_test' => 0,
'is_pay_later' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function membership_create_example() {
$params = [
- 'contact_id' => 94,
- 'membership_type_id' => 57,
+ 'contact_id' => 3,
+ 'membership_type_id' => 1,
'join_date' => '2009-01-21',
'start_date' => '2009-01-21',
'end_date' => '2009-12-21',
'source' => 'Payment',
'is_override' => 1,
- 'status_id' => 35,
+ 'status_id' => 36,
];
try{
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '94',
- 'membership_type_id' => '57',
+ 'contact_id' => '3',
+ 'membership_type_id' => '1',
'join_date' => '20090121000000',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '35',
+ 'status_id' => '36',
'is_override' => '1',
+ 'status_override_end_date' => '',
'owner_membership_id' => '',
'max_related' => '',
'is_test' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function membership_create_example() {
$params = [
- 'contact_id' => 112,
- 'membership_type_id' => 69,
+ 'contact_id' => 3,
+ 'membership_type_id' => 1,
'join_date' => '2009-01-21',
'start_date' => '2009-01-21',
'end_date' => '2009-12-21',
'source' => 'Payment',
'is_override' => 1,
- 'status_id' => 41,
+ 'status_id' => 42,
'custom_1' => 'custom string',
];
'values' => [
'1' => [
'id' => '1',
- 'contact_id' => '112',
- 'membership_type_id' => '69',
+ 'contact_id' => '3',
+ 'membership_type_id' => '1',
'join_date' => '20090121000000',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '41',
+ 'status_id' => '42',
'is_override' => '1',
+ 'status_override_end_date' => '',
'owner_membership_id' => '',
'max_related' => '',
'is_test' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipPaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipPaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipStatusTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipStatusTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function membership_type_delete_example() {
$params = [
- 'id' => 4,
+ 'id' => 5,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'name' => 'General',
'member_of_contact_id' => '4',
'financial_type_id' => '2',
- 'minimum_fee' => '0.00',
+ 'minimum_fee' => '0.000000000',
'duration_unit' => 'year',
'duration_interval' => '1',
'period_type' => 'rolling',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MembershipTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function message_template_create_example() {
$params = [
- 'msg_title' => 'msg_title_284',
- 'msg_subject' => 'msg_subject_284',
- 'msg_text' => 'msg_text_284',
- 'msg_html' => 'msg_html_284',
- 'workflow_id' => 284,
+ 'msg_title' => 'msg_title_471',
+ 'msg_subject' => 'msg_subject_471',
+ 'msg_text' => 'msg_text_471',
+ 'msg_html' => 'msg_html_471',
+ 'workflow_id' => 471,
'is_default' => '1',
'is_reserved' => 1,
];
'values' => [
'69' => [
'id' => '69',
- 'msg_title' => 'msg_title_284',
- 'msg_subject' => 'msg_subject_284',
- 'msg_text' => 'msg_text_284',
- 'msg_html' => 'msg_html_284',
+ 'msg_title' => 'msg_title_471',
+ 'msg_subject' => 'msg_subject_471',
+ 'msg_text' => 'msg_text_471',
+ 'msg_html' => 'msg_html_471',
'is_active' => '1',
- 'workflow_id' => '284',
+ 'workflow_id' => '471',
'is_default' => '1',
'is_reserved' => '1',
'is_sms' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function message_template_get_example() {
$params = [
- 'msg_title' => 'msg_title_285',
- 'msg_subject' => 'msg_subject_285',
- 'msg_text' => 'msg_text_285',
- 'msg_html' => 'msg_html_285',
- 'workflow_id' => 285,
+ 'msg_title' => 'msg_title_472',
+ 'msg_subject' => 'msg_subject_472',
+ 'msg_text' => 'msg_text_472',
+ 'msg_html' => 'msg_html_472',
+ 'workflow_id' => 472,
'is_default' => '1',
'is_reserved' => 1,
];
'values' => [
'70' => [
'id' => '70',
- 'msg_title' => 'msg_title_285',
- 'msg_subject' => 'msg_subject_285',
- 'msg_text' => 'msg_text_285',
- 'msg_html' => 'msg_html_285',
+ 'msg_title' => 'msg_title_472',
+ 'msg_subject' => 'msg_subject_472',
+ 'msg_text' => 'msg_text_472',
+ 'msg_html' => 'msg_html_472',
'is_active' => '1',
- 'workflow_id' => '285',
+ 'workflow_id' => '472',
'is_default' => '1',
'is_reserved' => '1',
- 'is_sms' => '1',
- 'pdf_format_id' => '285',
+ 'is_sms' => 0,
+ 'pdf_format_id' => '472',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MessageTemplateTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
function note_create_example() {
$params = [
'entity_table' => 'civicrm_contact',
- 'entity_id' => 9,
+ 'entity_id' => 15,
'note' => 'Hello!!! m testing Note',
- 'contact_id' => 9,
+ 'contact_id' => 15,
'modified_date' => '2011-01-31',
'subject' => 'Test Note',
];
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 8,
+ 'id' => 14,
'values' => [
- '8' => [
- 'id' => '8',
+ '14' => [
+ 'id' => '14',
'entity_table' => 'civicrm_contact',
- 'entity_id' => '9',
+ 'entity_id' => '15',
'note' => 'Hello!!! m testing Note',
- 'contact_id' => '9',
+ 'contact_id' => '15',
'modified_date' => '2012-11-14 16:02:35',
'subject' => 'Test Note',
'privacy' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/NoteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function note_delete_example() {
$params = [
- 'id' => 19,
+ 'id' => 32,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/NoteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
function note_get_example() {
$params = [
'entity_table' => 'civicrm_contact',
- 'entity_id' => 3,
+ 'entity_id' => 5,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/NoteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function open_i_d_create_example() {
$params = [
- 'contact_id' => 3,
+ 'contact_id' => 5,
'openid' => 'My OpenID handle',
- 'location_type_id' => 1,
];
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 1,
+ 'id' => 2,
'values' => [
- '1' => [
- 'id' => '1',
- 'contact_id' => '3',
+ '2' => [
+ 'id' => '2',
+ 'contact_id' => '5',
'location_type_id' => '1',
'openid' => 'My OpenID handle',
'allowed_to_login' => '',
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testCreateOpenID"
+* The test that created it is called "testCreateOpenIDDefaultLocation"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OpenIDTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function open_i_d_delete_example() {
$params = [
- 'id' => 3,
+ 'id' => 4,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OpenIDTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function open_i_d_get_example() {
$params = [
- 'contact_id' => 4,
+ 'contact_id' => 7,
'openid' => 'My OpenID handle',
'location_type_id' => 1,
];
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 3,
'values' => [
- '2' => [
- 'id' => '2',
- 'contact_id' => '4',
+ '3' => [
+ 'id' => '3',
+ 'contact_id' => '7',
'location_type_id' => '1',
'openid' => 'My OpenID handle',
'allowed_to_login' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OpenIDTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 92,
+ 'id' => 96,
'values' => [
'0' => [
- 'id' => '92',
+ 'id' => '96',
'name' => 'civicrm_event.amount.560',
'title' => '',
'description' => '',
'is_reserved' => '1',
'is_active' => '1',
'is_locked' => '',
- 'api.OptionValue.create' => 849,
+ 'api.OptionValue.create' => 869,
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function option_group_delete_example() {
$params = [
- 'id' => 97,
+ 'id' => 101,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionValueTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OptionValueTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'net_amount' => '100.00',
'trxn_id' => '',
'invoice_id' => '',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
'address_id' => '',
'check_number' => '',
'campaign_id' => '',
- 'creditnote_id' => 'CN_1',
+ 'creditnote_id' => '1',
'tax_amount' => '',
'revenue_recognition_date' => '',
'contribution_type_id' => '1',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'contact_id' => 8,
'receive_date' => '2010-01-20',
'total_amount' => 200,
- 'financial_type_id' => 1,
+ 'financial_type_id' => 'Event Fee',
'contribution_status_id' => 1,
'line_items' => [
'0' => [
'label' => 'Price Field 2',
'field_title' => 'Price Field 2',
'qty' => 1,
- 'unit_price' => '200',
- 'line_total' => '200',
+ 'unit_price' => '200.000000000',
+ 'line_total' => '200.000000000',
'financial_type_id' => '4',
'entity_table' => 'civicrm_membership',
'membership_type_id' => 1,
'1' => [
'id' => '1',
'contact_id' => '8',
- 'financial_type_id' => '1',
+ 'financial_type_id' => '4',
'contribution_page_id' => '',
'payment_instrument_id' => '4',
'receive_date' => '20100120000000',
'net_amount' => '200',
'trxn_id' => '',
'invoice_id' => '',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
'creditnote_id' => '',
'tax_amount' => '',
'revenue_recognition_date' => '',
- 'contribution_type_id' => '1',
+ 'contribution_type_id' => '4',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'label' => 'Price Field 1',
'field_title' => 'Price Field 1',
'qty' => 1,
- 'unit_price' => '100',
- 'line_total' => '100',
+ 'unit_price' => '100.000000000',
+ 'line_total' => '100.000000000',
'financial_type_id' => '4',
'entity_table' => 'civicrm_participant',
],
'label' => 'Price Field 2',
'field_title' => 'Price Field 2',
'qty' => 1,
- 'unit_price' => '200',
- 'line_total' => '200',
+ 'unit_price' => '200.000000000',
+ 'line_total' => '200.000000000',
'financial_type_id' => '4',
'entity_table' => 'civicrm_participant',
],
'net_amount' => '300',
'trxn_id' => '',
'invoice_id' => '',
+ 'invoice_number' => '',
'currency' => 'USD',
'cancel_date' => '',
'cancel_reason' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'display_name' => 'Mr. Anthony Anderson II',
'contribution_id' => '1',
'currency' => 'USD',
+ 'contribution_recur_id' => '',
+ 'contribution_status_id' => '1',
+ 'contribution_campaign_id' => '',
+ 'payment_instrument_id' => '4',
'receive_date' => '2010-01-20 00:00:00',
'non_deductible_amount' => '0.00',
'total_amount' => '100.00',
'net_amount' => '100.00',
'trxn_id' => '',
'invoice_id' => '',
- 'cancel_date' => '',
+ 'invoice_number' => '',
+ 'contribution_cancel_date' => '',
'cancel_reason' => '',
'receipt_date' => '',
'thankyou_date' => '',
'contribution_source' => '',
'amount_level' => '',
- 'contribution_recur_id' => '',
'is_test' => 0,
'is_pay_later' => 0,
- 'contribution_status_id' => '1',
'contribution_check_number' => '',
- 'contribution_campaign_id' => '',
- 'financial_type_id' => '1',
- 'financial_type' => 'Donation',
- 'product_id' => '',
- 'product_name' => '',
- 'sku' => '',
- 'contribution_product_id' => '',
- 'product_option' => '',
- 'fulfilled_date' => '',
- 'contribution_start_date' => '',
- 'contribution_end_date' => '',
'financial_account_id' => '1',
'accounting_code' => '4200',
'campaign_id' => '',
'contribution_campaign_title' => '',
+ 'financial_type_id' => '1',
'contribution_note' => '',
'contribution_batch' => '',
- 'contribution_status' => 'Completed',
+ 'contribution_recur_status' => 'Completed',
'payment_instrument' => 'Check',
- 'payment_instrument_id' => '4',
- 'instrument_id' => '4',
+ 'contribution_status' => 'Completed',
+ 'financial_type' => 'Donation',
'check_number' => '',
+ 'instrument_id' => '4',
+ 'cancel_date' => '',
'id' => '1',
'contribution_type_id' => '1',
'line_items' => [
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/OrderTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
function participant_create_example() {
$params = [
'contact_id' => 2,
- 'event_id' => 2,
+ 'event_id' => 3,
'status_id' => 1,
'role_id' => 1,
'register_date' => '2007-07-21 00:00:00',
'4' => [
'id' => '4',
'contact_id' => '2',
- 'event_id' => '2',
+ 'event_id' => '3',
'status_id' => '1',
'role_id' => '1',
'register_date' => '20070721000000',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'event_title' => 'Annual CiviCRM meet',
'event_start_date' => '2013-07-29 00:00:00',
'event_end_date' => '2013-08-04 00:00:00',
+ 'default_role_id' => '1',
'participant_id' => '1',
'participant_fee_level' => '',
'participant_fee_amount' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'contact_sub_type' => '',
'sort_name' => 'Anderson, Anthony',
'display_name' => 'Mr. Anthony Anderson II',
- 'event_id' => '41',
+ 'event_id' => '42',
'event_title' => 'Annual CiviCRM meet',
'event_start_date' => '2013-07-29 00:00:00',
'event_end_date' => '2013-08-04 00:00:00',
+ 'default_role_id' => '1',
'participant_id' => '2',
'participant_fee_level' => '',
'participant_fee_amount' => '',
'contact_sub_type' => '',
'sort_name' => 'Anderson, Anthony',
'display_name' => 'Mr. Anthony Anderson II',
- 'event_id' => '41',
+ 'event_id' => '42',
'event_title' => 'Annual CiviCRM meet',
'event_start_date' => '2013-07-29 00:00:00',
'event_end_date' => '2013-08-04 00:00:00',
+ 'default_role_id' => '1',
'participant_id' => '3',
'participant_fee_level' => '',
'participant_fee_amount' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'event_title' => 'Annual CiviCRM meet',
'event_start_date' => '2013-07-29 00:00:00',
'event_end_date' => '2013-08-04 00:00:00',
+ 'default_role_id' => '1',
'participant_id' => '1',
'participant_fee_level' => '',
'participant_fee_amount' => '',
'is_active' => '1',
'is_show_location' => 0,
'default_role_id' => '1',
- 'is_email_confirm' => 0,
+ 'is_email_confirm' => '1',
'is_pay_later' => 0,
'is_partial_payment' => 0,
'is_multiple_registrations' => 0,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function participant_payment_delete_example() {
$params = [
- 'id' => 5,
+ 'id' => 6,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function participant_payment_get_example() {
$params = [
- 'participant_id' => 64,
- 'contribution_id' => 6,
+ 'participant_id' => 68,
+ 'contribution_id' => 7,
];
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 6,
+ 'id' => 7,
'values' => [
- '6' => [
- 'id' => '6',
- 'participant_id' => '64',
- 'contribution_id' => '6',
+ '7' => [
+ 'id' => '7',
+ 'participant_id' => '68',
+ 'contribution_id' => '7',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantPaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ParticipantStatusTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'id' => 3,
'values' => [
'3' => [
- 'id' => 3,
+ 'id' => '3',
'from_financial_account_id' => '7',
'to_financial_account_id' => '6',
- 'trxn_date' => '20170207024650',
+ 'trxn_date' => '20190820192757',
'total_amount' => '-150',
'fee_amount' => '0.00',
- 'net_amount' => '150.00',
+ 'net_amount' => '-150',
'currency' => 'USD',
- 'is_payment' => 1,
+ 'is_payment' => '1',
'trxn_id' => '',
'trxn_result_code' => '',
'status_id' => '7',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'id' => '3',
'from_financial_account_id' => '7',
'to_financial_account_id' => '6',
- 'trxn_date' => '20170207024646',
+ 'trxn_date' => '20190820192755',
'total_amount' => '50',
'fee_amount' => '',
'net_amount' => '50',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'id' => '3',
'from_financial_account_id' => '7',
'to_financial_account_id' => '6',
- 'trxn_date' => '20170207024648',
+ 'trxn_date' => '20190820192756',
'total_amount' => '50',
'fee_amount' => '',
'net_amount' => '50',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'id' => '5',
'from_financial_account_id' => '7',
'to_financial_account_id' => '6',
- 'trxn_date' => '20170207024653',
+ 'trxn_date' => '20190820192758',
'total_amount' => '100',
'fee_amount' => '',
'net_amount' => '100',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 1,
'values' => [
- '2' => [
- 'id' => '2',
+ '1' => [
+ 'id' => '1',
'domain_id' => '1',
'name' => 'API Test PP',
+ 'title' => '',
'description' => '',
'payment_processor_type_id' => '1',
- 'is_active' => '',
+ 'is_active' => '1',
'is_default' => 0,
'is_test' => 0,
'user_name' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function payment_processor_delete_example() {
$params = [
- 'id' => 2,
+ 'id' => 3,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Pcp.get API.
+ *
+ * Demonstrates get + delete in the same call.
+ *
+ * @return array
+ * API result array
+ */
+function pcp_get_example() {
+ $params = [
+ 'title' => 'Pcp title',
+ 'api.Pcp.delete' => 1,
+ ];
+
+ try{
+ $result = civicrm_api3('Pcp', 'get', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function pcp_get_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 2,
+ 'values' => [
+ '3' => [
+ 'id' => '3',
+ 'contact_id' => '1',
+ 'status_id' => 0,
+ 'title' => 'Pcp title',
+ 'page_id' => '1',
+ 'page_type' => 'contribute',
+ 'pcp_block_id' => '1',
+ 'is_thermometer' => 0,
+ 'is_honor_roll' => 0,
+ 'currency' => 'USD',
+ 'is_active' => 0,
+ 'is_notify' => 0,
+ 'api.Pcp.delete' => [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => 1,
+ ],
+ ],
+ '5' => [
+ 'id' => '5',
+ 'contact_id' => '1',
+ 'status_id' => 0,
+ 'title' => 'Pcp title',
+ 'page_id' => '1',
+ 'page_type' => 'contribute',
+ 'pcp_block_id' => '1',
+ 'is_thermometer' => 0,
+ 'is_honor_roll' => 0,
+ 'currency' => 'USD',
+ 'is_active' => 0,
+ 'is_notify' => 0,
+ 'api.Pcp.delete' => [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => 1,
+ ],
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testGetPcpChainDelete"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Pcp.delete API.
+ *
+ * @return array
+ * API result array
+ */
+function pcp_delete_example() {
+ $params = [
+ 'id' => 4,
+ ];
+
+ try{
+ $result = civicrm_api3('Pcp', 'delete', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function pcp_delete_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => 1,
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testDeletePcp"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the Pcp.get API.
+ *
+ * @return array
+ * API result array
+ */
+function pcp_get_example() {
+ $params = [
+ 'title' => 'Pcp title',
+ 'contact_id' => 1,
+ 'page_id' => 1,
+ 'pcp_block_id' => 1,
+ ];
+
+ try{
+ $result = civicrm_api3('Pcp', 'get', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function pcp_get_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 3,
+ 'values' => [
+ '3' => [
+ 'id' => '3',
+ 'contact_id' => '1',
+ 'status_id' => 0,
+ 'title' => 'Pcp title',
+ 'page_id' => '1',
+ 'page_type' => 'contribute',
+ 'pcp_block_id' => '1',
+ 'is_thermometer' => 0,
+ 'is_honor_roll' => 0,
+ 'currency' => 'USD',
+ 'is_active' => 0,
+ 'is_notify' => 0,
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testGetPcp"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
*/
function phone_create_example() {
$params = [
- 'contact_id' => 3,
- 'location_type_id' => 6,
+ 'contact_id' => 5,
'phone' => '(123) 456-7890',
'is_primary' => 1,
'phone_type_id' => 1,
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 3,
'values' => [
- '2' => [
- 'id' => '2',
- 'contact_id' => '3',
- 'location_type_id' => '6',
+ '3' => [
+ 'id' => '3',
+ 'contact_id' => '5',
+ 'location_type_id' => '1',
'is_primary' => '1',
'is_billing' => '',
'mobile_provider_id' => '',
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testCreatePhone"
+* The test that created it is called "testCreatePhoneDefaultLocation"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PhoneTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function phone_delete_example() {
$params = [
- 'id' => 3,
+ 'id' => 4,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PhoneTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function phone_get_example() {
$params = [
- 'contact_id' => 7,
+ 'contact_id' => 12,
'phone' => '(123) 456-7890',
];
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 4,
+ 'id' => 5,
'values' => [
- '4' => [
- 'id' => '4',
- 'contact_id' => '7',
- 'location_type_id' => '10',
+ '5' => [
+ 'id' => '5',
+ 'contact_id' => '12',
+ 'location_type_id' => '15',
'is_primary' => '1',
'is_billing' => 0,
'phone' => '(123) 456-7890',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PhoneTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ConstantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function pledge_create_example() {
$params = [
- 'contact_id' => 11,
- 'pledge_create_date' => '20170207',
- 'start_date' => '20170207',
- 'scheduled_date' => '20170209',
+ 'contact_id' => 12,
+ 'pledge_create_date' => '20190820',
+ 'start_date' => '20190820',
+ 'scheduled_date' => '20190822',
'amount' => '100',
'pledge_status_id' => '2',
'pledge_financial_type_id' => '1',
'values' => [
'0' => [
'id' => '1',
- 'contact_id' => '11',
+ 'contact_id' => '12',
'financial_type_id' => '1',
'contribution_page_id' => '',
'amount' => '100',
'status_id' => '2',
'is_test' => '',
'campaign_id' => '',
+ 'contribution_type_id' => '1',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'display_name' => 'Mr. Anthony Anderson II',
'pledge_id' => '1',
'pledge_amount' => '100.00',
- 'pledge_create_date' => '2017-02-07 00:00:00',
- 'pledge_start_date' => '2017-02-07 00:00:00',
+ 'pledge_create_date' => '2019-08-20 00:00:00',
+ 'pledge_start_date' => '2019-08-20 00:00:00',
'pledge_status' => 'Pending',
'pledge_total_paid' => '',
- 'pledge_next_pay_date' => '2017-02-09 00:00:00',
+ 'pledge_next_pay_date' => '2019-08-22 00:00:00',
'pledge_next_pay_amount' => '20.00',
'pledge_outstanding_amount' => '',
'pledge_financial_type' => 'Donation',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function pledge_get_example() {
$params = [
- 'pledge_start_date_high' => '20170205024740',
+ 'pledge_start_date_high' => '20190818192828',
];
try{
'display_name' => 'Mr. Anthony Anderson II',
'pledge_id' => '2',
'pledge_amount' => '100.00',
- 'pledge_create_date' => '2017-02-07 00:00:00',
- 'pledge_start_date' => '2016-03-04 00:00:00',
+ 'pledge_create_date' => '2019-08-20 00:00:00',
+ 'pledge_start_date' => '2018-03-02 00:00:00',
'pledge_status' => 'Overdue',
'pledge_total_paid' => '',
- 'pledge_next_pay_date' => '2016-03-04 00:00:00',
+ 'pledge_next_pay_date' => '2018-03-02 00:00:00',
'pledge_next_pay_amount' => '20.00',
'pledge_outstanding_amount' => '20.00',
'pledge_financial_type' => 'Donation',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function pledge_payment_create_example() {
$params = [
- 'contact_id' => 1,
+ 'contact_id' => 3,
'pledge_id' => 1,
'contribution_id' => 1,
'status_id' => 1,
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PledgePaymentTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_active' => '1',
'financial_type_id' => '2',
'non_deductible_amount' => '',
+ 'visibility_id' => '',
'contribution_type_id' => '2',
],
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldValueTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldValueTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'price_field_id' => '1',
'name' => 'contribution_amount',
'label' => 'Contribution Amount',
- 'amount' => '1',
+ 'amount' => '1.000000000',
'weight' => '1',
'is_default' => 0,
'is_active' => '1',
'financial_type_id' => '1',
'non_deductible_amount' => '0.00',
+ 'visibility_id' => '1',
'contribution_type_id' => '1',
],
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldValueTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 18,
+ 'id' => 20,
'values' => [
- '18' => [
- 'id' => '18',
+ '20' => [
+ 'id' => '20',
'domain_id' => '',
'name' => 'event price',
'title' => 'event price',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceSetTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function price_set_delete_example() {
$params = [
- 'id' => 19,
+ 'id' => 21,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceSetTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceSetTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function profile_apply_example() {
$params = [
- 'profile_id' => 31,
- 'contact_id' => 3,
+ 'profile_id' => 30,
+ 'contact_id' => 5,
'first_name' => 'abc2',
'last_name' => 'xyz2',
'email-Primary' => 'abc2.xyz2@gmail.com',
'values' => [
'contact_type' => 'Individual',
'contact_sub_type' => '',
- 'contact_id' => 3,
+ 'contact_id' => 5,
'version' => 3,
'debug' => 1,
- 'profile_id' => 31,
+ 'profile_id' => 30,
'first_name' => 'abc2',
'last_name' => 'xyz2',
'email' => [
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'1' => 1,
'2' => 'Billing',
],
- 'contact_id' => 3,
+ 'contact_id' => 5,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
function profile_getfields_example() {
$params = [
'action' => 'submit',
- 'profile_id' => 27,
+ 'profile_id' => 22,
];
try{
'count' => 9,
'values' => [
'custom_1' => [
+ 'id' => '1',
'label' => '_addCustomFieldToProfile',
- 'groupTitle' => '_addCustomFie',
+ 'headerPattern' => '//',
+ 'title' => 'first_name',
+ 'custom_field_id' => '1',
+ 'groupTitle' => '_addCustomFieldToProfile',
'data_type' => 'String',
+ 'name' => 'custom_1',
+ 'type' => 2,
'html_type' => 'Text',
'default_value' => 'defaultValue',
'text_length' => '',
'is_required' => 0,
'table_name' => 'civicrm_value__addcustomfie_1',
'column_name' => '_addcustomfieldtoprofile_1',
- 'name' => 'custom_1',
- 'title' => 'first_name',
- 'type' => 2,
+ 'where' => 'civicrm_value__addcustomfie_1._addcustomfieldtoprofile_1',
+ 'extends_table' => 'civicrm_contact',
+ 'search_table' => 'contact_a',
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
'table_name' => 'civicrm_address',
'entity' => 'address',
'bao' => 'CRM_Core_BAO_Address',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 6,
],
+ 'is_core_field' => TRUE,
'api.required' => 0,
'help_pre' => '',
'help_post' => '',
'type' => 1,
'title' => 'State Province',
'description' => 'Which State_Province does this address belong to.',
+ 'where' => 'civicrm_address.state_province_id',
'table_name' => 'civicrm_address',
'entity' => 'address',
'bao' => 'CRM_Core_BAO_Address',
+ 'localizable' => 0,
+ 'localize_context' => 'province',
'FKClassName' => 'CRM_Core_DAO_StateProvince',
'html' => [
'type' => 'ChainSelect',
'keyColumn' => 'id',
'labelColumn' => 'name',
],
+ 'is_core_field' => TRUE,
'FKApiName' => 'StateProvince',
'api.required' => '1',
'help_pre' => '',
'type' => 1,
'title' => 'Country',
'description' => 'Which Country does this address belong to.',
+ 'where' => 'civicrm_address.country_id',
'table_name' => 'civicrm_address',
'entity' => 'address',
'bao' => 'CRM_Core_BAO_Address',
+ 'localizable' => 0,
+ 'localize_context' => 'country',
'FKClassName' => 'CRM_Core_DAO_Country',
'html' => [
'type' => 'Select',
'keyColumn' => 'id',
'labelColumn' => 'name',
'nameColumn' => 'iso_code',
+ 'abbrColumn' => 'iso_code',
],
+ 'is_core_field' => TRUE,
'FKApiName' => 'Country',
'api.required' => '1',
'help_pre' => '',
'table_name' => 'civicrm_phone',
'entity' => 'phone',
'bao' => 'CRM_Core_BAO_Phone',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 32,
'size' => 20,
],
+ 'is_core_field' => TRUE,
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
'table_name' => 'civicrm_email',
'entity' => 'email',
'bao' => 'CRM_Core_BAO_Email',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 254,
'size' => 30,
],
+ 'is_core_field' => TRUE,
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
'table_name' => 'civicrm_contact',
'entity' => 'contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 30,
],
+ 'is_core_field' => TRUE,
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
'table_name' => 'civicrm_contact',
'entity' => 'contact',
'bao' => 'CRM_Contact_BAO_Contact',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 64,
'size' => 30,
],
+ 'is_core_field' => TRUE,
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function profile_submit_example() {
$params = [
- 'profile_id' => 29,
- 'contact_id' => 3,
+ 'profile_id' => 24,
+ 'contact_id' => 5,
'first_name' => 'abc2',
'last_name' => 'xyz2',
'email-primary' => 'abc2.xyz2@gmail.com',
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 3,
+ 'id' => 5,
'values' => [
- '3' => [
- 'id' => '3',
+ '5' => [
+ 'id' => '5',
'contact_type' => 'Individual',
'contact_sub_type' => '',
'do_not_email' => 0,
'prefix_id' => '3',
'suffix_id' => '3',
'formal_title' => '',
- 'communication_style_id' => '',
+ 'communication_style_id' => '1',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => 'Dear abc1',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ProfileTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTypeTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
/**
* Test Generated example demonstrating the ReportTemplate.getrows API.
*
- * Retrieve rows from a report template (optionally providing the instance_id).
+ * Retrieve rows from a mailing opened report template.
*
* @return array
* API result array
*/
function report_template_getrows_example() {
$params = [
- 'report_id' => 'contact/summary',
+ 'report_id' => 'Mailing/opened',
'options' => [
'metadata' => [
'0' => 'labels',
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 2,
+ 'count' => 5,
'values' => [
'0' => [
- 'civicrm_contact_sort_name' => 'Second Domain',
- 'civicrm_contact_id' => '2',
- 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/report/contact/detail&reset=1&force=1&id_op=eq&id_value=2',
- 'civicrm_contact_sort_name_hover' => 'View Contact Detail Report for this contact',
+ 'civicrm_contact_id' => '102',
+ 'civicrm_contact_sort_name' => 'One, Test',
+ 'civicrm_mailing_mailing_name' => 'Second Test Mailing Events',
+ 'civicrm_mailing_mailing_name_alias' => 'Second Test Mailing Events',
+ 'civicrm_mailing_mailing_subject' => 'Hello again, {contact.display_name}',
+ 'civicrm_mailing_event_opened_id' => '17',
+ 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:23:22',
+ 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=102',
+ 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.',
],
'1' => [
- 'civicrm_contact_sort_name' => 'Unit Test Organization',
- 'civicrm_contact_id' => '1',
- 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/report/contact/detail&reset=1&force=1&id_op=eq&id_value=1',
- 'civicrm_contact_sort_name_hover' => 'View Contact Detail Report for this contact',
+ 'civicrm_contact_id' => '109',
+ 'civicrm_contact_sort_name' => 'Five, Test',
+ 'civicrm_mailing_mailing_name' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}',
+ 'civicrm_mailing_event_opened_id' => '9',
+ 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:19:03',
+ 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=109',
+ 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.',
+ ],
+ '2' => [
+ 'civicrm_contact_id' => '110',
+ 'civicrm_contact_sort_name' => 'Six, Test',
+ 'civicrm_mailing_mailing_name' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}',
+ 'civicrm_mailing_event_opened_id' => '5',
+ 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:17:54',
+ 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=110',
+ 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.',
+ ],
+ '3' => [
+ 'civicrm_contact_id' => '111',
+ 'civicrm_contact_sort_name' => 'Seven, Test',
+ 'civicrm_mailing_mailing_name' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}',
+ 'civicrm_mailing_event_opened_id' => '15',
+ 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:20:59',
+ 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=111',
+ 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.',
+ ],
+ '4' => [
+ 'civicrm_contact_id' => '112',
+ 'civicrm_contact_sort_name' => 'Eight, Test',
+ 'civicrm_mailing_mailing_name' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_name_alias' => 'First Mailing Events',
+ 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}',
+ 'civicrm_mailing_event_opened_id' => '11',
+ 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:19:44',
+ 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=112',
+ 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.',
],
],
'metadata' => [
'title' => 'ERROR: Title is not Set',
'labels' => [
'civicrm_contact_sort_name' => 'Contact Name',
+ 'civicrm_mailing_mailing_name' => 'Mailing Name',
+ 'civicrm_mailing_mailing_subject' => 'Mailing Subject',
+ 'civicrm_mailing_event_opened_time_stamp' => 'Open Date',
],
],
];
/*
* This example has been generated from the API test suite.
-* The test that created it is called "testReportTemplateGetRowsContactSummary"
+* The test that created it is called "testReportTemplateGetRowsMailingUniqueOpened"
* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ReportTemplateTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 0,
- 'values' => '',
+ 'count' => 1,
+ 'id' => 'counts',
+ 'values' => [
+ 'counts' => [
+ 'rowCount' => [
+ 'title' => 'Row(s) Listed',
+ 'value' => 0,
+ ],
+ ],
+ ],
];
return $expectedResult;
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ReportTemplateTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'saved_search_id' => '3',
'is_active' => '1',
'visibility' => 'User and User Admin Only',
- 'where_clause' => ' ( ( `civicrm_group_contact_cache_1`.group_id IN (\"1\") ) ) ',
- 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:31:\"`civicrm_group_contact_cache_1`\";s:132:\" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1` ON contact_a.id = `civicrm_group_contact_cache_1`.contact_id \";}',
- 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:31:\"`civicrm_group_contact_cache_1`\";s:132:\" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1` ON contact_a.id = `civicrm_group_contact_cache_1`.contact_id \";}',
+ 'where_clause' => ' ( ( ( civicrm_group_contact_cache_5d5bbe284d3e9.group_id IN (\"1\") ) ) ) ',
+ 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:41:\"civicrm_group_contact_cache_5d5bbe284d3e9\";s:152:\" LEFT JOIN civicrm_group_contact_cache civicrm_group_contact_cache_5d5bbe284d3e9 ON contact_a.id = civicrm_group_contact_cache_5d5bbe284d3e9.contact_id \";}',
+ 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:41:\"civicrm_group_contact_cache_5d5bbe284d3e9\";s:152:\" LEFT JOIN civicrm_group_contact_cache civicrm_group_contact_cache_5d5bbe284d3e9 ON contact_a.id = civicrm_group_contact_cache_5d5bbe284d3e9.contact_id \";}',
'group_type' => '',
'cache_date' => '',
'refresh_date' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$expectedResult = [
'is_error' => 0,
'version' => 3,
- 'count' => 157,
+ 'count' => 173,
'values' => [
'address_standardization_provider' => [
'group_name' => 'Address Preferences',
'group' => 'address',
'name' => 'address_standardization_provider',
'type' => 'String',
- 'html_type' => 'Select',
+ 'html_type' => 'select',
'default' => '',
'add' => '4.1',
'title' => 'Address Standardization Provider.',
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_SelectValues::addressProvider',
+ ],
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group' => 'address',
'name' => 'address_standardization_userid',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '',
'add' => '4.1',
- 'title' => 'Web service user ID',
+ 'title' => 'Provider service user ID',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group' => 'address',
'name' => 'address_standardization_url',
'type' => 'Text',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '',
'add' => '4.1',
- 'title' => 'Web Service URL',
+ 'title' => 'Provider Service URL',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group' => 'campaign',
'name' => 'tag_unconfirmed',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => 'Unconfirmed',
'add' => '4.1',
'title' => 'Tag for Unconfirmed Petition Signers',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
- 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.',
+ 'description' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.',
+ 'help_text' => '',
+ 'settings_pages' => [
+ 'campaign' => [
+ 'weight' => 10,
+ ],
+ ],
],
'petition_contacts' => [
'group_name' => 'Campaign Preferences',
'group' => 'campaign',
'name' => 'petition_contacts',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => 'Petition Contacts',
'add' => '4.1',
'title' => 'Petition Signers Group',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
- 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.',
+ 'description' => 'All contacts that have signed a CiviCampaign petition will be added to this group. The group will be created if it does not exist (it is required for email verification).',
+ 'help_text' => '',
+ 'settings_pages' => [
+ 'campaign' => [
+ 'weight' => 20,
+ ],
+ ],
],
'civicaseRedactActivityEmail' => [
'group_name' => 'CiviCRM Preferences',
'description' => 'How to sort activity-types on the \"Manage Case\" screen? (Set \"Default\" to load setting from the legacy \"Settings.xml\" file.)',
'help_text' => '',
],
+ 'civicaseActivityRevisions' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'civicaseActivityRevisions',
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => '',
+ 'html_type' => 'radio',
+ 'add' => '4.7',
+ 'title' => 'Enable Embedded Activity Revisions',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Enable tracking of activity revisions embedded within the \"civicrm_activity\" table. Alternatively, see \"Administer => System Settings => Misc => Logging\".',
+ 'help_text' => '',
+ ],
'cvv_backoffice_required' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'cvv_backoffice_required',
'type' => 'Boolean',
+ 'html_type' => 'radio',
'quick_form_type' => 'YesNo',
'default' => '1',
'add' => '4.1',
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'invoicing',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'quick_form_type' => 'Element',
'default' => 0,
'title' => 'Enable Tax and Invoicing',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
- 'help_text' => '',
+ 'on_change' => [
+ '0' => 'CRM_Invoicing_Utils::onToggle',
+ ],
],
'acl_financial_type' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'acl_financial_type',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'quick_form_type' => 'Element',
'default' => 0,
'is_contact' => 0,
'description' => '',
'help_text' => '',
+ 'help' => [
+ 'id' => 'acl_financial_type',
+ ],
],
'deferred_revenue_enabled' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'deferred_revenue_enabled',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'quick_form_type' => 'Element',
'default' => 0,
'group' => 'contribute',
'name' => 'default_invoice_page',
'type' => 'Integer',
- 'quick_form_type' => 'Element',
+ 'quick_form_type' => 'Select',
'default' => '',
'pseudoconstant' => [
- 'name' => 'contributionPage',
+ 'callback' => 'CRM_Contribute_PseudoConstant::contributionPage',
],
'html_type' => 'select',
'add' => '4.7',
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'always_post_to_accounts_receivable',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'quick_form_type' => 'Element',
'default' => 0,
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'update_contribution_on_membership_type_change',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'quick_form_type' => 'Element',
'default' => 0,
'title' => 'Viewing Contacts',
'is_domain' => '1',
'is_contact' => 0,
- 'description' => '',
+ 'description' => 'Select the tabs that should be displayed when viewing a contact record. EXAMPLE: If your organization does not keep track of \'Relationships\', then un-check this option to simplify the screen display. Tabs for Contributions, Pledges, Memberships, Events, Grants and Cases are also hidden if the corresponding component is not enabled. Go to Administer > System Settings > Enable Components to modify the components which are available for your site.',
'help_text' => '',
+ 'serialize' => 1,
],
'contact_edit_options' => [
'group_name' => 'CiviCRM Preferences',
'title' => 'Editing Contacts',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
+ 'description' => 'Select the sections that should be included when adding or editing a contact record. EXAMPLE: If your organization does not record Gender and Birth Date for individuals, then simplify the form by un-checking this option. Drag interface allows you to change the order of the panes displayed on contact add/edit screen.',
'help_text' => '',
+ 'serialize' => 1,
],
'advanced_search_options' => [
'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
'name' => 'advanced_search_options',
'type' => 'String',
'html_type' => 'checkboxes',
'title' => 'Contact Search',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
- 'help_text' => '',
+ 'description' => 'Select the sections that should be included in the Basic and Advanced Search forms. EXAMPLE: If you don\'t track Relationships - then you do not need this section included in the advanced search form. Simplify the form by un-checking this option.',
+ 'serialize' => 1,
],
'user_dashboard_options' => [
'group_name' => 'CiviCRM Preferences',
'title' => 'Contact Dashboard',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
+ 'description' => 'Select the sections that should be included in the Contact Dashboard. EXAMPLE: If you don\'t want constituents to view their own contribution history, un-check that option.',
'help_text' => '',
+ 'serialize' => 1,
],
'address_options' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'address_options',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'checkboxes',
'pseudoconstant' => [
'optionGroupName' => 'address_options',
],
'default' => '\ 11\ 12\ 13\ 14\ 15\ 16\ 18\ 19\ 110\ 111\ 1',
'add' => '4.1',
- 'title' => 'Addressing Options',
+ 'title' => 'Address Fields',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'help_text' => '',
+ 'serialize' => 1,
],
'address_format' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'address_format',
'type' => 'String',
- 'html_type' => 'TextArea',
+ 'html_type' => 'textarea',
'default' => '{contact.address_name}
{contact.street_address}
{contact.supplemental_address_1}
{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
{contact.country}',
'add' => '4.1',
- 'title' => 'Address Format',
+ 'title' => 'Address Display Format',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group' => 'core',
'name' => 'mailing_format',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'textarea',
'default' => '{contact.addressee}
{contact.street_address}
{contact.supplemental_address_1}
{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
{contact.country}',
'add' => '4.1',
- 'title' => 'Mailing Format',
+ 'title' => 'Mailing Label Format',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group' => 'core',
'name' => 'display_name_format',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'textarea',
'default' => '{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}',
'add' => '4.1',
- 'title' => 'Display Name Format',
+ 'title' => 'Individual Display Name Format',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
- 'help_text' => '',
+ 'description' => 'Display name format for individual contact display names.',
],
'sort_name_format' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'sort_name_format',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'textarea',
'default' => '{contact.last_name}{, }{contact.first_name}',
'add' => '4.1',
- 'title' => 'Sort Name Format',
+ 'title' => 'Individual Sort Name Format',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
- 'help_text' => '',
+ 'description' => 'Sort name format for individual contact display names.',
],
'remote_profile_submissions' => [
'group_name' => 'CiviCRM Preferences',
'name' => 'allow_alert_autodismissal',
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
- 'default' => '1',
+ 'default' => TRUE,
'html_type' => 'radio',
'add' => '4.7',
'title' => 'Allow alerts to auto-dismiss?',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'If disabled, alert messages in CiviCRM will never be automatically dismissed after 10 seconds.',
+ 'description' => 'If disabled, CiviCRM will not automatically dismiss any alerts after 10 seconds.',
'help_text' => '',
],
'editor_id' => [
'group' => 'core',
'name' => 'editor_id',
'type' => 'String',
- 'html_type' => 'Select',
+ 'html_type' => 'select',
'default' => 'CKEditor',
'add' => '4.1',
'title' => 'Wysiwig Editor',
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'wysiwyg_editor',
+ 'keyColumn' => 'name',
+ ],
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group' => 'core',
'name' => 'contact_ajax_check_similar',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'radio',
'default' => '1',
'add' => '4.1',
- 'title' => 'Ajax Check Similar',
+ 'title' => 'Check for Similar Contacts',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'help_text' => '',
+ 'options' => [
+ '1' => 'While Typing',
+ '0' => 'When Saving',
+ '2' => 'Never',
+ ],
],
'ajaxPopupsEnabled' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'ajaxPopupsEnabled',
'type' => 'Boolean',
- 'quick_form_type' => 'YesNo',
+ 'html_type' => 'checkbox',
'default' => 1,
'add' => '4.5',
- 'title' => 'Ajax Popups Enabled',
+ 'title' => 'Enable Popup Forms',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'activity_assignee_notification',
- 'type' => 'String',
- 'html_type' => 'Text',
+ 'type' => 'Boolean',
+ 'html_type' => 'checkbox',
'default' => '1',
'add' => '4.1',
'title' => 'Notify Activity Assignees',
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'activity_assignee_notification_ics',
- 'type' => 'String',
- 'html_type' => 'Text',
+ 'type' => 'Boolean',
+ 'html_type' => 'checkbox',
'default' => 0,
'add' => '4.3',
'title' => 'Include ICal Invite to Activity Assignees',
'group' => 'core',
'name' => 'contact_autocomplete_options',
'type' => 'String',
- 'quick_form_type' => 'CheckBox',
+ 'html_type' => 'checkboxes',
'pseudoconstant' => [
'callback' => 'CRM_Admin_Form_Setting_Search::getContactAutocompleteOptions',
],
'is_contact' => 0,
'description' => 'Selected fields will be displayed in back-office autocomplete dropdown search results (Quick Search, etc.). Contact Name is always included.',
'help_text' => '',
+ 'serialize' => 1,
+ 'validate_callback' => 'CRM_Admin_Form_Setting_Search::enableOptionOne',
],
'contact_reference_options' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'contact_reference_options',
'type' => 'String',
- 'quick_form_type' => 'CheckBox',
+ 'html_type' => 'checkboxes',
'pseudoconstant' => [
'callback' => 'CRM_Admin_Form_Setting_Search::getContactReferenceOptions',
],
'is_contact' => 0,
'description' => 'Selected fields will be displayed in autocomplete dropdown search results for \'Contact Reference\' custom fields. Contact Name is always included. NOTE: You must assign \'access contact reference fields\' permission to the anonymous role if you want to use custom contact reference fields in profiles on public pages. For most situations, you should use the \'Limit List to Group\' setting when configuring a contact reference field which will be used in public forms to prevent exposing your entire contact list.',
'help_text' => '',
+ 'serialize' => 1,
+ 'validate_callback' => 'CRM_Admin_Form_Setting_Search::enableOptionOne',
],
'contact_smart_group_display' => [
'group_name' => 'CiviCRM Preferences',
'title' => 'Viewing Smart Groups',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
+ 'description' => 'Controls display of the smart groups that a contact is part of in each contact\'s \"Groups\" tab. \"Show on Demand\" provides the best performance, and is recommended for most sites.',
'help_text' => '',
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'contact_smart_group_display',
+ ],
],
'smart_group_cache_refresh_mode' => [
'group_name' => 'CiviCRM Preferences',
'title' => 'Maximum Attachments',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'Maximum number of files (documents, images, etc.) which can attached to emails or activities.',
+ 'description' => 'Maximum number of files (documents, images, etc.) which can be attached to emails or activities.',
'help_text' => '',
],
'maxFileSize' => [
'title' => 'Maximum File Size (in MB)',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'Maximum Size of file (documents, images, etc.) which can attached to emails or activities.<br />Note: php.ini should support this file size.',
+ 'description' => 'Maximum Size of file (documents, images, etc.) which can be attached to emails or activities.<br />Note: php.ini should support this file size.',
'help_text' => '',
],
'contact_undelete' => [
'size' => 64,
'maxlength' => 256,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '',
'add' => '4.3',
'title' => 'Path to wkhtmltopdf executable',
'size' => 64,
'maxlength' => 64,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '',
'add' => '4.3',
'title' => 'Recaptcha Options',
'size' => 64,
'maxlength' => 64,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '',
'add' => '4.3',
'title' => 'Recaptcha Site Key',
'description' => '',
'help_text' => '',
],
+ 'forceRecaptcha' => [
+ 'add' => '4.7',
+ 'help_text' => '',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'forceRecaptcha',
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'html_type' => '',
+ 'default' => 0,
+ 'title' => 'Force reCAPTCHA on Contribution pages',
+ 'description' => 'If enabled, reCAPTCHA will show on all contribution pages.',
+ ],
'recaptchaPrivateKey' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'size' => 64,
'maxlength' => 64,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '',
'add' => '4.3',
'title' => 'Recaptcha Secret Key',
'size' => 2,
'maxlength' => 8,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => 7,
'add' => '4.3',
'title' => 'Checksum Lifespan',
'size' => 64,
'maxlength' => 128,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '*default*',
'add' => '4.3',
'title' => 'Blog Feed URL',
'size' => 64,
'maxlength' => 128,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '*default*',
'add' => '4.3',
'title' => 'Community Messages URL',
'size' => 64,
'maxlength' => 128,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => '*default*',
'add' => '4.3',
'title' => 'Getting Started URL',
'group' => 'core',
'name' => 'enable_components',
'type' => 'Array',
- 'quick_form_type' => 'Element',
- 'html_type' => 'advmultiselect',
- 'html_attributes' => [
- 'size' => 5,
- 'style' => 'width:150px',
- 'class' => 'advmultiselect',
- ],
+ 'html_type' => 'checkboxes',
'default' => '',
'add' => '4.4',
'title' => 'Enable Components',
'1' => 'CRM_Core_Component::flushEnabledComponents',
'2' => 'call://resources/resetCacheCode',
],
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_SelectValues::getComponentSelectValues',
+ ],
],
'disable_core_css' => [
'group_name' => 'CiviCRM Preferences',
'size' => '32',
'maxlength' => '64',
],
- 'default' => '',
+ 'default' => 'users',
'title' => 'CMS Users Table Name',
'description' => '',
],
'group' => 'core',
'name' => 'syncCMSEmail',
'type' => 'Boolean',
+ 'html_type' => 'YesNo',
'quick_form_type' => 'YesNo',
'default' => 1,
'add' => '4.7',
'title' => 'Sync CMS Email',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'If enabled, then CMS email id will be syncronised with CiviCRM contacts\'s primary email.',
+ 'description' => 'If enabled, then CMS email id will be synchronised with CiviCRM contacts\'s primary email.',
'help_text' => '',
],
'preserve_activity_tab_filter' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'preserve_activity_tab_filter',
- 'type' => 'String',
- 'html_type' => 'Text',
+ 'type' => 'Boolean',
+ 'html_type' => 'checkbox',
'default' => 0,
'add' => '4.7',
'title' => 'Preserve activity filters as a user preference',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts',
+ 'description' => 'When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts.',
+ ],
+ 'do_not_notify_assignees_for' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'do_not_notify_assignees_for',
+ 'type' => 'Array',
+ 'add' => '4.7',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'default' => [],
+ 'title' => 'Do not notify assignees for',
+ 'description' => 'These activity types will be excluded from automated email notifications to assignees.',
+ 'html_type' => 'select',
+ 'html_attributes' => [
+ 'multiple' => 1,
+ 'class' => 'huge crm-select2',
+ ],
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'activity_type',
+ ],
+ 'quick_form_type' => 'Select',
+ ],
+ 'menubar_position' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'menubar_position',
+ 'type' => 'String',
+ 'html_type' => 'select',
+ 'default' => 'over-cms-menu',
+ 'add' => '5.12',
+ 'title' => 'Menubar position',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Location of the CiviCRM main menu.',
+ 'help_text' => '',
+ 'options' => [
+ 'over-cms-menu' => 'Replace website menu',
+ 'below-cms-menu' => 'Below website menu',
+ 'above-crm-container' => 'Above content area',
+ 'none' => 'None - disable menu',
+ ],
+ ],
+ 'menubar_color' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'menubar_color',
+ 'type' => 'String',
+ 'html_type' => 'color',
+ 'default' => '#1b1b1b',
+ 'add' => '5.13',
+ 'title' => 'Menubar color',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Color of the CiviCRM main menu.',
+ 'help_text' => '',
+ 'validate_callback' => 'CRM_Utils_Color::normalize',
+ ],
+ 'requestableMimeTypes' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'requestableMimeTypes',
+ 'type' => 'String',
+ 'html_type' => 'Text',
+ 'default' => 'image/jpeg,image/pjpeg,image/gif,image/x-png,image/png,image/jpg,text/html,application/pdf',
+ 'add' => '5.13',
+ 'title' => 'Mime Types that can be passed as URL params',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Acceptable Mime Types that can be used as part of file urls',
+ 'help_text' => '',
+ ],
+ 'theme_frontend' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'theme_frontend',
+ 'type' => 'String',
+ 'quick_form_type' => 'Select',
+ 'html_type' => 'Select',
+ 'html_attributes' => [
+ 'class' => 'crm-select2',
+ ],
+ 'pseudoconstant' => [
+ 'callback' => 'call://themes/getAvailable',
+ ],
+ 'default' => 'default',
+ 'add' => '5.16',
+ 'title' => 'Frontend Theme',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Theme to use on frontend pages',
'help_text' => '',
],
+ 'theme_backend' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'theme_backend',
+ 'type' => 'String',
+ 'quick_form_type' => 'Select',
+ 'html_type' => 'Select',
+ 'html_attributes' => [
+ 'class' => 'crm-select2',
+ ],
+ 'pseudoconstant' => [
+ 'callback' => 'call://themes/getAvailable',
+ ],
+ 'default' => 'default',
+ 'add' => '5.16',
+ 'title' => 'Backend Theme',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Theme to use on backend pages',
+ 'help_text' => '',
+ ],
+ 'http_timeout' => [
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'http_timeout',
+ 'type' => 'Integer',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => [
+ 'size' => 2,
+ 'maxlength' => 3,
+ ],
+ 'default' => 5,
+ 'add' => '5.14',
+ 'title' => 'HTTP request timeout',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'How long should HTTP requests through Guzzle application run for in seconds',
+ 'help_text' => 'Set the number of seconds http requests should run for before terminating',
+ ],
'assetCache' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'is_contact' => 0,
'description' => 'Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites',
],
+ 'environment' => [
+ 'group_name' => 'Developer Preferences',
+ 'group' => 'developer',
+ 'name' => 'environment',
+ 'type' => 'String',
+ 'html_type' => 'Select',
+ 'quick_form_type' => 'Select',
+ 'default' => 'Production',
+ 'pseudoconstant' => [
+ 'optionGroupName' => 'environment',
+ ],
+ 'add' => '4.7',
+ 'title' => 'Environment',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Setting to define the environment in which this CiviCRM instance is running.',
+ 'on_change' => [
+ '0' => 'CRM_Core_BAO_Setting::onChangeEnvironmentSetting',
+ ],
+ ],
'fatalErrorHandler' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'group' => 'directory',
'name' => 'uploadDir',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'group' => 'directory',
'name' => 'imageUploadDir',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'group' => 'directory',
'name' => 'customFileUploadDir',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'group' => 'directory',
'name' => 'customTemplateDir',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'group' => 'directory',
'name' => 'customPHPPathDir',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'group' => 'directory',
'name' => 'extensionsDir',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'enable_cart' => [
'name' => 'enable_cart',
'group_name' => 'Event Preferences',
+ 'settings_pages' => [
+ 'event' => [
+ 'weight' => 10,
+ ],
+ ],
'group' => 'event',
'type' => 'Boolean',
- 'quick_form_type' => 'Element',
+ 'quick_form_type' => 'CheckBox',
'default' => 0,
'add' => '4.1',
- 'title' => 'Enable Event Cart',
+ 'title' => 'Use Shopping Cart Style Event Registration',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'WRITE ME',
- 'help_text' => 'WRITE ME',
+ 'description' => 'This feature allows users to register for more than one event at a time. When enabled, users will add event(s) to a \"cart\" and then pay for them all at once. Enabling this setting will affect online registration for all active events. The code is an alpha state, and you will potentially need to have developer resources to debug and fix sections of the codebase while testing and deploying it',
+ 'help_text' => '',
+ 'documentation_link' => [
+ 'page' => 'CiviEvent Cart Checkout',
+ 'resource' => 'wiki',
+ ],
],
'show_events' => [
'name' => 'show_events',
'group_name' => 'Event Preferences',
'group' => 'event',
+ 'settings_pages' => [
+ 'event' => [
+ 'weight' => 20,
+ ],
+ ],
'type' => 'Integer',
- 'quick_form_type' => 'Element',
+ 'quick_form_type' => 'Select',
'default' => 10,
'add' => '4.5',
'title' => 'Dashboard entries',
'is_contact' => 0,
'description' => 'Configure how many events should be shown on the dashboard. This overrides the default value of 10 entries.',
'help_text' => '',
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_SelectValues::getDashboardEntriesCount',
+ ],
],
'ext_repo_url' => [
'group_name' => 'Extension Preferences',
'size' => 64,
'maxlength' => 128,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => 'https://civicrm.org/extdir/ver={ver}|cms={uf}',
'add' => '4.3',
'title' => 'Extension Repo URL',
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => [],
- 'default' => '1228',
'add' => '4.4',
'title' => 'Default Country',
'is_domain' => 1,
'is_contact' => 0,
+ 'is_required' => '',
'description' => 'This value is selected by default when adding a new contact address.',
'help_text' => '',
'pseudoconstant' => [
'callback' => 'CRM_Core_I18n::languages',
],
],
+ 'uiLanguages' => [
+ 'group_name' => 'Localization Preferences',
+ 'group' => 'localization',
+ 'name' => 'uiLanguages',
+ 'type' => 'Array',
+ 'quick_form_type' => 'Select',
+ 'html_type' => 'select',
+ 'html_attributes' => [
+ 'multiple' => 1,
+ 'class' => 'crm-select2',
+ ],
+ 'default' => '',
+ 'add' => '5.9',
+ 'title' => 'Available Languages',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => '',
+ 'help_text' => 'User Interface languages available to users',
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_I18n::languages',
+ ],
+ ],
'lcMessages' => [
'group_name' => 'Localization Preferences',
'group' => 'localization',
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'profile_double_optin',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => '1',
'add' => '4.1',
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'track_civimail_replies',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'civimail_workflow',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
- 'title' => 'Use CiviMail Workflow',
+ 'title' => 'Enable workflow support for CiviMail',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'When CiviMail is enabled, users who \"subscribe\" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
+ 'description' => 'Drupal-only. Rules module must be enabled (beta feature - use with caution).',
'help_text' => '',
],
'civimail_server_wide_lock' => [
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'civimail_server_wide_lock',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
- 'title' => 'Lock Mails Server-Wide for Mail Sending',
+ 'title' => 'Enable global server wide lock for CiviMail',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'profile_add_to_group_double_optin',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
- 'title' => 'Enable Double Opt-in for Profile Group(s) field',
+ 'title' => 'Enable Double Opt-in for Profiles which use the \"Add to Group\" setting',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'When CiviMail is enabled, users who \"subscribe\" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
+ 'description' => 'When CiviMail is enabled and a profile uses the \"Add to Group\" setting, users who complete the profile form will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
'help_text' => '',
],
'disable_mandatory_tokens_check' => [
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'disable_mandatory_tokens_check',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.4',
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'dedupe_email_default',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 1,
'add' => '4.5',
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'hash_mailing_url',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.5',
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'civimail_multiple_bulk_emails',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.5',
- 'title' => ' Multiple Bulk Emails',
+ 'title' => 'Enable multiple bulk email address for a contact.',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'If enabled, CiviMail will deliver a copy of the email to each bulk email listed for the contact.',
+ 'description' => 'CiviMail will deliver a copy of the email to each bulk email listed for the contact. Enabling this setting will also change the options for the \"Email on Hold\" field in Advanced Search.',
'help_text' => '',
],
'include_message_id' => [
'group_name' => 'Mailing Preferences',
'group' => 'mailing',
'name' => 'include_message_id',
- 'type' => 'Integer',
+ 'type' => 'Boolean',
'html_type' => 'checkbox',
'default' => '',
'add' => '4.5',
'group' => 'mailing',
'name' => 'write_activity_record',
'type' => 'Boolean',
- 'quick_form_type' => 'YesNo',
+ 'html_type' => 'checkbox',
+ 'quick_form_type' => 'CheckBox',
'default' => '1',
'add' => '4.7',
'title' => 'Enable CiviMail to create activities on delivery',
'description' => 'The number of emails sendable via simple mail. Make sure you understand the implications for your spam reputation and legal requirements for bulk emails before editing. As there is some risk both to your spam reputation and the products if this is misused it is a hidden setting',
'help_text' => 'CiviCRM forces users sending more than this number of mails to use CiviMails. CiviMails have additional precautions: not sending to contacts who do not want bulk mail, adding domain name and opt out links. You should familiarise yourself with the law relevant to you on bulk mailings if changing this setting. For the US https://en.wikipedia.org/wiki/CAN-SPAM_Act_of_2003 is a good place to start.',
],
+ 'auto_recipient_rebuild' => [
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'auto_recipient_rebuild',
+ 'type' => 'Boolean',
+ 'html_type' => 'checkbox',
+ 'quick_form_type' => 'CheckBox',
+ 'default' => '1',
+ 'title' => 'Enable automatic CiviMail recipient count display',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Enable this setting to rebuild recipient list automatically during composing mail. Disable will allow you to rebuild recipient manually.',
+ 'help_text' => 'CiviMail automatically fetches recipient list and count whenever mailing groups are included or excluded while composing bulk mail. This phenomena may degrade performance for large sites, so disable this setting to build and fetch recipients for selected groups, manually.',
+ ],
+ 'allow_mail_from_logged_in_contact' => [
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'allow_mail_from_logged_in_contact',
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => 1,
+ 'title' => 'Allow mail from logged in contact',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Allow sending email from the logged in contact\'s email address',
+ 'help_text' => 'CiviCRM allows you to send email from the domain from email addresses and the logged in contact id addresses by default. Disable this if you only want to allow the domain from addresses to be used.',
+ ],
'geoAPIKey' => [
'add' => '4.7',
'help_text' => '',
'group' => 'member',
'name' => 'default_renewal_contribution_page',
'type' => 'Integer',
- 'html_type' => 'Select',
+ 'html_type' => 'select',
'default' => '',
'pseudoconstant' => [
- 'name' => 'contributionPage',
+ 'callback' => 'CRM_Contribute_PseudoConstant::contributionPage',
],
'add' => '4.1',
'title' => 'Default online membership renewal page',
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'is_enabled',
- 'title' => 'Multisite Is enabled',
- 'type' => 'Integer',
+ 'title' => 'Enable Multi Site Configuration',
+ 'html_type' => 'checkbox',
+ 'type' => 'Boolean',
'default' => 0,
'add' => '4.1',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'Multisite is enabled',
+ 'description' => 'Make CiviCRM aware of multiple domains. You should configure a domain group if enabled',
+ 'documentation_link' => [
+ 'page' => 'Multi Site Installation',
+ 'resource' => 'wiki',
+ ],
'help_text' => '',
+ 'settings_pages' => [
+ 'multisite' => [
+ 'weight' => 10,
+ ],
+ ],
],
'domain_group_id' => [
'group_name' => 'Multi Site Preferences',
'name' => 'domain_group_id',
'title' => 'Multisite Domain Group',
'type' => 'Integer',
+ 'html_type' => 'entity_reference',
+ 'entity_reference_options' => [
+ 'entity' => 'Group',
+ 'select' => [
+ 'minimumInputLength' => 0,
+ ],
+ ],
'default' => 0,
'add' => '4.1',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => '',
+ 'description' => 'Contacts created on this site are added to this group',
'help_text' => '',
+ 'settings_pages' => [
+ 'multisite' => [
+ 'weight' => 20,
+ ],
+ ],
],
'event_price_set_domain_id' => [
'group_name' => 'Multi Site Preferences',
'name' => 'search_autocomplete_count',
'type' => 'Integer',
'quick_form_type' => 'Element',
- 'html_type' => 'text',
- 'html_attributes' => [
- 'size' => 2,
- 'maxlength' => 2,
- ],
+ 'html_type' => 'number',
'default' => 10,
'add' => '4.3',
'title' => 'Autocomplete Results',
'size' => 64,
'maxlength' => 64,
],
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'default' => 'simple',
'add' => '4.5',
'title' => 'How to handle full-tet queries',
'name' => 'smartGroupCacheTimeout',
'type' => 'Integer',
'quick_form_type' => 'Element',
- 'html_type' => 'text',
+ 'html_type' => 'number',
'default' => 5,
'add' => '4.6',
'title' => 'Smart group cache timeout',
'description' => 'If set, this will be the default profile used for contact search.',
'help_text' => '',
],
+ 'prevNextBackend' => [
+ 'group_name' => 'Search Preferences',
+ 'group' => 'Search Preferences',
+ 'name' => 'prevNextBackend',
+ 'type' => 'String',
+ 'quick_form_type' => 'Select',
+ 'html_type' => 'Select',
+ 'html_attributes' => [],
+ 'default' => 'default',
+ 'add' => '5.9',
+ 'title' => 'PrevNext Cache',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_BAO_PrevNextCache::getPrevNextBackends',
+ ],
+ 'description' => 'When performing a search, how should the search-results be cached?',
+ 'help_text' => '',
+ ],
'searchPrimaryDetailsOnly' => [
'group_name' => 'Search Preferences',
'group' => 'Search Preferences',
'description' => 'If enabled, only primary details (eg contact\'s primary email, phone, etc) will be included in Basic and Advanced Search results. Disabling this feature will allow users to match contacts using any email, phone etc detail.',
'help_text' => '',
],
+ 'quicksearch_options' => [
+ 'group_name' => 'Search Preferences',
+ 'group' => 'Search Preferences',
+ 'name' => 'quicksearch_options',
+ 'type' => 'string',
+ 'serialize' => 1,
+ 'html_type' => 'checkboxes',
+ 'sortable' => TRUE,
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_SelectValues::quicksearchOptions',
+ ],
+ 'default' => [
+ '0' => 'sort_name',
+ '1' => 'contact_id',
+ '2' => 'external_identifier',
+ '3' => 'first_name',
+ '4' => 'last_name',
+ '5' => 'email',
+ '6' => 'phone_numeric',
+ '7' => 'street_address',
+ '8' => 'city',
+ '9' => 'postal_code',
+ '10' => 'job_title',
+ ],
+ 'add' => '5.8',
+ 'title' => 'Quicksearch options',
+ 'is_domain' => '1',
+ 'is_contact' => 0,
+ 'description' => 'Which fields can be searched on in the menubar quicksearch box? Don\'t see your custom field here? Make sure it is marked as Searchable.',
+ 'help_text' => '',
+ ],
'userFrameworkResourceURL' => [
'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().',
'group' => 'url',
'name' => 'userFrameworkResourceURL',
'title' => 'CiviCRM Resource URL',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'title' => 'Image Upload URL',
'name' => 'imageUploadURL',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'name' => 'customCSSURL',
'title' => 'Custom CSS URL',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
'title' => 'Extension Resource URL',
'name' => 'extensionsURL',
'type' => 'String',
- 'html_type' => 'Text',
+ 'html_type' => 'text',
'quick_form_type' => 'Element',
'default' => '',
'add' => '4.1',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 13947,
+ 'id' => 14033,
'values' => [
- '13947' => [
- 'id' => '13947',
+ '14033' => [
+ 'id' => '14033',
'name' => 'Wessex',
'abbreviation' => 'WEX',
'country_id' => '1226',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function state_province_delete_example() {
$params = [
- 'id' => 13948,
+ 'id' => 14034,
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 13949,
+ 'id' => 14035,
'values' => [
- '13949' => [
- 'id' => '13949',
+ '14035' => [
+ 'id' => '14035',
'name' => 'Wessex',
'abbreviation' => 'WEX',
'country_id' => '1226',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SurveyRespondantTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SystemTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 12,
+ 'id' => 17,
'values' => [
- '12' => [
- 'id' => '12',
+ '17' => [
+ 'id' => '17',
'name' => 'Super Heros',
'description' => 'Outside undie-wearers',
'parent_id' => '',
- 'is_selectable' => '',
- 'is_reserved' => '',
- 'is_tagset' => '',
+ 'is_selectable' => '1',
+ 'is_reserved' => 0,
+ 'is_tagset' => 0,
'used_for' => 'civicrm_contact',
'created_id' => '',
'color' => '',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function tag_delete_example() {
$params = [
- 'id' => '17',
+ 'id' => '24',
];
try{
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function tag_get_example() {
$params = [
- 'id' => '7',
+ 'id' => '8',
'name' => 'New Tag3',
];
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 7,
+ 'id' => 8,
'values' => [
- '7' => [
- 'id' => '7',
+ '8' => [
+ 'id' => '8',
'name' => 'New Tag3',
'description' => 'This is description for Our New Tag ',
'is_selectable' => '1',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'title' => 'Tag ID',
'description' => 'Tag ID',
'required' => TRUE,
+ 'where' => 'civicrm_tag.id',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
'api.aliases' => [
'0' => 'tag',
],
'required' => TRUE,
'maxlength' => 64,
'size' => 30,
+ 'where' => 'civicrm_tag.name',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
'api.required' => 1,
],
'description' => [
'description' => 'Optional verbose description of the tag.',
'maxlength' => 255,
'size' => 45,
+ 'where' => 'civicrm_tag.description',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'parent_id' => [
'name' => 'parent_id',
'type' => 1,
'title' => 'Parent Tag',
'description' => 'Optional parent id for this tag.',
+ 'where' => 'civicrm_tag.parent_id',
'default' => 'NULL',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Core_DAO_Tag',
+ 'is_core_field' => TRUE,
'FKApiName' => 'Tag',
],
'is_selectable' => [
'type' => 16,
'title' => 'Display Tag?',
'description' => 'Is this tag selectable / displayed',
+ 'where' => 'civicrm_tag.is_selectable',
'default' => '1',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'is_reserved' => [
'name' => 'is_reserved',
'type' => 16,
'title' => 'Reserved',
+ 'where' => 'civicrm_tag.is_reserved',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'is_tagset' => [
'name' => 'is_tagset',
'type' => 16,
'title' => 'Tagset',
+ 'where' => 'civicrm_tag.is_tagset',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'used_for' => [
'name' => 'used_for',
'title' => 'Used For',
'maxlength' => 64,
'size' => 30,
+ 'where' => 'civicrm_tag.used_for',
'default' => 'NULL',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'serialize' => 5,
'html' => [
'type' => 'Select',
'maxlength' => 64,
'optionGroupName' => 'tag_used_for',
'optionEditPath' => 'civicrm/admin/options/tag_used_for',
],
+ 'is_core_field' => TRUE,
'api.default' => 'civicrm_contact',
],
'created_id' => [
'type' => 1,
'title' => 'Tag Created By',
'description' => 'FK to civicrm_contact, who created this tag',
+ 'where' => 'civicrm_tag.created_id',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'is_core_field' => TRUE,
'FKApiName' => 'Contact',
],
'color' => [
'description' => 'Hex color value e.g. #ffffff',
'maxlength' => 255,
'size' => 45,
+ 'where' => 'civicrm_tag.color',
'default' => 'NULL',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
'created_date' => [
'name' => 'created_date',
'type' => 12,
'title' => 'Tag Created Date',
'description' => 'Date and time that tag was created.',
+ 'where' => 'civicrm_tag.created_date',
'table_name' => 'civicrm_tag',
'entity' => 'Tag',
'bao' => 'CRM_Core_BAO_Tag',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'id' => 0,
'values' => [
'0' => [
- 'id' => '19',
+ 'id' => '27',
'label' => 'New Tag3',
'description' => [
'0' => 'This is description for Our New Tag ',
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function tag_get_example() {
$params = [
- 'id' => '8',
+ 'id' => '10',
'name' => 'New Tag3',
'return' => [
'0' => 'name',
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 8,
+ 'id' => 10,
'values' => [
- '8' => [
- 'id' => '8',
+ '10' => [
+ 'id' => '10',
'name' => 'New Tag3',
],
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'is_active' => 0,
'group_type' => 'Individual,Contact',
'title' => 'Test Group',
+ 'frontend_title' => '',
'description' => '',
'help_pre' => 'help pre',
'help_post' => 'help post',
'created_id' => '1',
'created_date' => '2013-07-28 08:49:19',
'is_proximity_search' => '',
+ 'cancel_button_text' => '',
+ 'submit_button_text' => '',
+ 'add_cancel_button' => '',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'created_id' => '1',
'created_date' => '2013-07-28 08:49:19',
'is_proximity_search' => 0,
+ 'add_cancel_button' => '1',
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFGroupTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFJoinTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFJoinTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFMatchTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the User.get API.
+ *
+ * @return array
+ * API result array
+ */
+function user_get_example() {
+ $params = [
+ 'contact_id' => 3,
+ 'sequential' => 1,
+ ];
+
+ try{
+ $result = civicrm_api3('User', 'get', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function user_get_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 6,
+ 'values' => [
+ '0' => [
+ 'id' => '6',
+ 'name' => 'superman',
+ 'contact_id' => '3',
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testUserGet"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UserTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
--- /dev/null
+<?php
+/**
+ * Test Generated example demonstrating the User.getfields API.
+ *
+ * @return array
+ * API result array
+ */
+function user_getfields_example() {
+ $params = [
+ 'action' => 'get',
+ ];
+
+ try{
+ $result = civicrm_api3('User', 'getfields', $params);
+ }
+ catch (CiviCRM_API3_Exception $e) {
+ // Handle error here.
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
+ 'error_code' => $errorCode,
+ 'error_data' => $errorData,
+ ];
+ }
+
+ return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function.
+ *
+ * @return array
+ * API result array
+ */
+function user_getfields_expectedresult() {
+
+ $expectedResult = [
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 3,
+ 'values' => [
+ 'contact_id' => [
+ 'title' => 'Contact ID',
+ 'type' => 1,
+ 'api.required' => 1,
+ 'name' => 'contact_id',
+ ],
+ 'id' => [
+ 'title' => 'CMS User ID',
+ 'type' => 1,
+ 'name' => 'id',
+ ],
+ 'name' => [
+ 'title' => 'Username',
+ 'type' => 2,
+ 'name' => 'name',
+ ],
+ ],
+ ];
+
+ return $expectedResult;
+}
+
+/*
+* This example has been generated from the API test suite.
+* The test that created it is called "testGetFields"
+* and can be found at:
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UserTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
+*
+* To Learn about the API read
+* https://docs.civicrm.org/dev/en/latest/api/
+*
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
+*
+* Read more about testing here
+* https://docs.civicrm.org/dev/en/latest/testing/
+*
+* API Standards documentation:
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
+*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
*/
function website_get_example() {
$params = [
- 'contact_id' => 4,
+ 'contact_id' => 5,
'url' => 'website.com',
'website_type_id' => 1,
];
'values' => [
'2' => [
'id' => '2',
- 'contact_id' => '4',
+ 'contact_id' => '5',
'url' => 'website.com',
'website_type_id' => '1',
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'title' => 'Website ID',
'description' => 'Unique Website ID',
'required' => TRUE,
+ 'where' => 'civicrm_website.id',
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
+ 'is_core_field' => TRUE,
'api.aliases' => [
'0' => 'website_id',
],
'type' => 1,
'title' => 'Contact',
'description' => 'FK to Contact ID',
+ 'where' => 'civicrm_website.contact_id',
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'is_core_field' => TRUE,
'FKApiName' => 'Contact',
],
'url' => [
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => 128,
'size' => 30,
],
+ 'is_core_field' => TRUE,
],
'website_type_id' => [
'name' => 'website_type_id',
'type' => 1,
'title' => 'Website Type',
'description' => 'Which Website type does this website belong to.',
+ 'where' => 'civicrm_website.website_type_id',
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'size' => 6,
'optionGroupName' => 'website_type',
'optionEditPath' => 'civicrm/admin/options/website_type',
],
+ 'is_core_field' => TRUE,
],
],
];
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
'title' => 'Website ID',
'description' => 'Unique Website ID',
'required' => '1',
+ 'where' => 'civicrm_website.id',
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
+ 'is_core_field' => '1',
'api.aliases' => [
'0' => 'website_id',
],
'type' => '1',
'title' => 'Contact',
'description' => 'FK to Contact ID',
+ 'where' => 'civicrm_website.contact_id',
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'is_core_field' => '1',
'FKApiName' => 'Contact',
],
'url' => [
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
'html' => [
'type' => 'Text',
'maxlength' => '128',
'size' => '30',
],
+ 'is_core_field' => '1',
],
'website_type_id' => [
'name' => 'website_type_id',
'type' => '1',
'title' => 'Website Type',
'description' => 'Which Website type does this website belong to.',
+ 'where' => 'civicrm_website.website_type_id',
'table_name' => 'civicrm_website',
'entity' => 'Website',
'bao' => 'CRM_Core_BAO_Website',
+ 'localizable' => 0,
'html' => [
'type' => 'Select',
'size' => '6',
'optionGroupName' => 'website_type',
'optionEditPath' => 'civicrm/admin/options/website_type',
],
+ 'is_core_field' => '1',
],
],
],
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/WebsiteTest.php
*
* You can see the outcome of the API tests at
-* https://test.civicrm.org/job/CiviCRM-master-git/
+* https://test.civicrm.org/job/CiviCRM-Core-Matrix/
*
* To Learn about the API read
-* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+* https://docs.civicrm.org/dev/en/latest/api/
*
-* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api
+* Browse the API on your own site with the API Explorer. It is in the main
+* CiviCRM menu, under: Support > Development > API Explorer.
*
* Read more about testing here
-* http://wiki.civicrm.org/confluence/display/CRM/Testing
+* https://docs.civicrm.org/dev/en/latest/testing/
*
* API Standards documentation:
-* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/
*/
$errorMessage = $e->getMessage();
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
- return array(
+ return [
'is_error' => 1,
'error_message' => $errorMessage,
'error_code' => $errorCode,
'error_data' => $errorData,
- );
+ ];
}{/literal}
return $result;