3 * Test Generated example of using activity_type get API.
6 * The activity_type api is deprecated. Please use the option_value api instead.
11 function activity_type_get_example() {
15 $result = civicrm_api3('activity_type', '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 activity_type api is deprecated. Please use the option_value api instead.',
99 return $expectedResult;
103 * This example has been generated from the API test suite.
104 * The test that created it is called
105 * testActivityTypeGet
106 * and can be found in
107 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTypeTest.php
109 * You can see the outcome of the API tests at
110 * https://test.civicrm.org/job/CiviCRM-master-git/
112 * To Learn about the API read
113 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
115 * Browse the api on your own site with the api explorer
116 * http://MYSITE.ORG/path/to/civicrm/api
118 * Read more about testing here
119 * http://wiki.civicrm.org/confluence/display/CRM/Testing
121 * API Standards documentation:
122 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards