3 * Test Generated example demonstrating the ActivityType.get API.
6 * The ActivityType api is deprecated. Please use the OptionValue api instead.
11 function activity_type_get_example() {
15 $result = civicrm_api3('ActivityType', 'get', $params);
17 catch (CiviCRM_API3_Exception
$e) {
19 $errorMessage = $e->getMessage();
20 $errorCode = $e->getErrorCode();
21 $errorData = $e->getExtraParams();
24 'error_message' => $errorMessage,
25 'error_code' => $errorCode,
26 'error_data' => $errorData,
34 * Function returns array of result expected from previous function.
39 function activity_type_get_expectedresult() {
49 '4' => 'Outbound SMS',
50 '5' => 'Event Registration',
51 '6' => 'Contribution',
52 '7' => 'Membership Signup',
53 '8' => 'Membership Renewal',
54 '9' => 'Tell a Friend',
55 '10' => 'Pledge Acknowledgment',
56 '11' => 'Pledge Reminder',
57 '12' => 'Inbound Email',
58 '17' => 'Membership Renewal Reminder',
60 '22' => 'Print/Merge Document',
62 '35' => 'Change Membership Status',
63 '36' => 'Change Membership Type',
64 '37' => 'Cancel Recurring Contribution',
65 '38' => 'Update Recurring Contribution Billing Details',
66 '39' => 'Update Recurring Contribution',
67 '40' => 'Reminder Sent',
68 '41' => 'Export Accounting Batch',
69 '42' => 'Create Batch',
71 '44' => 'SMS delivery',
72 '45' => 'Inbound SMS',
75 '48' => 'Change Registration',
76 '49' => 'Downloaded Invoice',
77 '50' => 'Emailed Invoice',
78 '51' => 'Contact Merged',
79 '52' => 'Contact Deleted by Merge',
80 '54' => 'Failed Payment',
82 'deprecated' => 'The ActivityType api is deprecated. Please use the OptionValue api instead.',
85 return $expectedResult;
89 * This example has been generated from the API test suite.
90 * The test that created it is called "testActivityTypeGet"
91 * and can be found at:
92 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php
94 * You can see the outcome of the API tests at
95 * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
97 * To Learn about the API read
98 * https://docs.civicrm.org/dev/en/latest/api/
100 * Browse the API on your own site with the API Explorer. It is in the main
101 * CiviCRM menu, under: Support > Development > API Explorer.
103 * Read more about testing here
104 * https://docs.civicrm.org/dev/en/latest/testing/
106 * API Standards documentation:
107 * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/