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() {
41 $expectedResult = array(
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',
60 '15' => 'Change Case Type',
61 '16' => 'Change Case Status',
62 '17' => 'Membership Renewal Reminder',
63 '18' => 'Change Case Start Date',
65 '20' => 'Assign Case Role',
66 '21' => 'Remove Case Role',
67 '22' => 'Print/Merge Document',
69 '24' => 'Reassigned Case',
71 '26' => 'Change Case Tags',
72 '27' => 'Add Client To Case',
77 '32' => 'Petition Signature',
78 '33' => 'Change Custom Data',
80 '35' => 'Change Membership Status',
81 '36' => 'Change Membership Type',
82 '37' => 'Cancel Recurring Contribution',
83 '38' => 'Update Recurring Contribution Billing Details',
84 '39' => 'Update Recurring Contribution',
85 '40' => 'Reminder Sent',
86 '41' => 'Export Accounting Batch',
87 '42' => 'Create Batch',
89 '44' => 'SMS delivery',
90 '45' => 'Inbound SMS',
93 '48' => 'Change Registration',
94 '49' => 'Downloaded Invoice',
95 '50' => 'Emailed Invoice',
96 '51' => 'Contact Merged',
97 '52' => 'Contact Deleted by Merge',
98 '53' => 'Failed Payment',
99 '54' => 'Close Accounting Period',
101 'deprecated' => 'The ActivityType api is deprecated. Please use the OptionValue api instead.',
104 return $expectedResult;
108 * This example has been generated from the API test suite.
109 * The test that created it is called "testActivityTypeGet"
110 * and can be found at:
111 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php
113 * You can see the outcome of the API tests at
114 * https://test.civicrm.org/job/CiviCRM-master-git/
116 * To Learn about the API read
117 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
119 * Browse the api on your own site with the api explorer
120 * http://MYSITE.ORG/path/to/civicrm/api
122 * Read more about testing here
123 * http://wiki.civicrm.org/confluence/display/CRM/Testing
125 * API Standards documentation:
126 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards