b6e93f75a9e553fe1d847b75280d4a36425f732a
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();
23 'error' => $errorMessage,
24 'error_code' => $errorCode,
25 'error_data' => $errorData,
33 * Function returns array of result expected from previous function.
38 function activity_type_get_expectedresult() {
40 $expectedResult = array(
48 '4' => 'Outbound SMS',
49 '5' => 'Event Registration',
50 '6' => 'Contribution',
51 '7' => 'Membership Signup',
52 '8' => 'Membership Renewal',
53 '9' => 'Tell a Friend',
54 '10' => 'Pledge Acknowledgment',
55 '11' => 'Pledge Reminder',
56 '12' => 'Inbound Email',
59 '15' => 'Change Case Type',
60 '16' => 'Change Case Status',
61 '17' => 'Membership Renewal Reminder',
62 '18' => 'Change Case Start Date',
64 '20' => 'Assign Case Role',
65 '21' => 'Remove Case Role',
66 '22' => 'Print PDF Letter',
68 '24' => 'Reassigned Case',
70 '26' => 'Change Case Tags',
71 '27' => 'Add Client To Case',
76 '32' => 'Petition Signature',
77 '33' => 'Change Custom Data',
79 '35' => 'Change Membership Status',
80 '36' => 'Change Membership Type',
81 '37' => 'Cancel Recurring Contribution',
82 '38' => 'Update Recurring Contribution Billing Details',
83 '39' => 'Update Recurring Contribution',
84 '40' => 'Reminder Sent',
85 '41' => 'Export Accounting Batch',
86 '42' => 'Create Batch',
88 '44' => 'SMS delivery',
89 '45' => 'Inbound SMS',
92 '48' => 'Change Registration',
93 '49' => 'Downloaded Invoice',
94 '50' => 'Emailed Invoice',
96 'deprecated' => 'The ActivityType api is deprecated. Please use the OptionValue api instead.',
99 return $expectedResult;
103 * This example has been generated from the API test suite.
104 * The test that created it is called "testActivityTypeGet"
105 * and can be found at:
106 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php
108 * You can see the outcome of the API tests at
109 * https://test.civicrm.org/job/CiviCRM-master-git/
111 * To Learn about the API read
112 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
114 * Browse the api on your own site with the api explorer
115 * http://MYSITE.ORG/path/to/civicrm/api
117 * Read more about testing here
118 * http://wiki.civicrm.org/confluence/display/CRM/Testing
120 * API Standards documentation:
121 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards