3 * Test Generated example demonstrating the UFJoin.create API.
8 function uf_join_create_example() {
10 'module' => 'CiviCampaign',
11 'entity_table' => 'civicrm_survey',
20 $result = civicrm_api3('UFJoin', 'create', $params);
22 catch (CiviCRM_API3_Exception
$e) {
24 $errorMessage = $e->getMessage();
25 $errorCode = $e->getErrorCode();
26 $errorData = $e->getExtraParams();
29 'error_message' => $errorMessage,
30 'error_code' => $errorCode,
31 'error_data' => $errorData,
39 * Function returns array of result expected from previous function.
44 function uf_join_create_expectedresult() {
55 'module' => 'CiviCampaign',
56 'entity_table' => 'civicrm_survey',
59 'uf_group_id' => '11',
65 return $expectedResult;
69 * This example has been generated from the API test suite.
70 * The test that created it is called "testCreateSurveyUFJoin"
71 * and can be found at:
72 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFJoinTest.php
74 * You can see the outcome of the API tests at
75 * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
77 * To Learn about the API read
78 * https://docs.civicrm.org/dev/en/latest/api/
80 * Browse the API on your own site with the API Explorer. It is in the main
81 * CiviCRM menu, under: Support > Development > API Explorer.
83 * Read more about testing here
84 * https://docs.civicrm.org/dev/en/latest/testing/
86 * API Standards documentation:
87 * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/