3 * Test Generated example of using contact getactions API.
5 * Getting the available actions for an entity.
10 function contact_getactions_example() {
14 $result = civicrm_api3('contact', 'getactions', $params);
16 catch (CiviCRM_API3_Exception
$e) {
18 $errorMessage = $e->getMessage();
19 $errorCode = $e->getErrorCode();
20 $errorData = $e->getExtraParams();
22 'error' => $errorMessage,
23 'error_code' => $errorCode,
24 'error_data' => $errorData,
32 * Function returns array of result expected from previous function.
37 function contact_getactions_expectedresult() {
39 $expectedResult = array(
63 'deprecated' => array(
64 'getquick' => 'The "getquick" action is deprecated in favor of "getlist".',
65 'update' => 'The "update" action is deprecated. Use "create" with an id instead.',
69 return $expectedResult;
73 * This example has been generated from the API test suite.
74 * The test that created it is called
77 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
79 * You can see the outcome of the API tests at
80 * https://test.civicrm.org/job/CiviCRM-master-git/
82 * To Learn about the API read
83 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
85 * Browse the api on your own site with the api explorer
86 * http://MYSITE.ORG/path/to/civicrm/api
88 * Read more about testing here
89 * http://wiki.civicrm.org/confluence/display/CRM/Testing
91 * API Standards documentation:
92 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards