3 * Test Generated example demonstrating the UFField.get API.
8 function uf_field_get_example() {
12 $result = civicrm_api3('UFField', 'get', $params);
14 catch (CiviCRM_API3_Exception
$e) {
16 $errorMessage = $e->getMessage();
17 $errorCode = $e->getErrorCode();
18 $errorData = $e->getExtraParams();
21 'error_message' => $errorMessage,
22 'error_code' => $errorCode,
23 'error_data' => $errorData,
31 * Function returns array of result expected from previous function.
36 function uf_field_get_expectedresult() {
38 $expectedResult = array(
46 'uf_group_id' => '11',
47 'field_name' => 'phone',
52 'visibility' => 'Public Pages and Listings',
54 'is_searchable' => '1',
55 'location_type_id' => '1',
56 'phone_type_id' => '1',
57 'label' => 'Test Phone',
58 'field_type' => 'Contact',
59 'is_multi_summary' => 0,
64 return $expectedResult;
68 * This example has been generated from the API test suite.
69 * The test that created it is called "testGetUFFieldSuccess"
70 * and can be found at:
71 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php
73 * You can see the outcome of the API tests at
74 * https://test.civicrm.org/job/CiviCRM-master-git/
76 * To Learn about the API read
77 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
79 * Browse the api on your own site with the api explorer
80 * http://MYSITE.ORG/path/to/civicrm/api
82 * Read more about testing here
83 * http://wiki.civicrm.org/confluence/display/CRM/Testing
85 * API Standards documentation:
86 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards