3 * Test Generated example of using uf_field get API
6 function uf_field_get_example(){
10 $result = civicrm_api3('uf_field', 'get', $params);
12 catch (CiviCRM_API3_Exception
$e) {
14 $errorMessage = $e->getMessage();
15 $errorCode = $e->getErrorCode();
16 $errorData = $e->getExtraParams();
17 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
24 * Function returns array of result expected from previous function
26 function uf_field_get_expectedresult(){
28 $expectedResult = array(
36 'uf_group_id' => '11',
37 'field_name' => 'phone',
42 'visibility' => 'Public Pages and Listings',
44 'is_searchable' => '1',
45 'location_type_id' => '1',
46 'phone_type_id' => '1',
47 'label' => 'Test Phone',
48 'field_type' => 'Contact',
49 'is_multi_summary' => 0,
54 return $expectedResult;
59 * This example has been generated from the API test suite. The test that created it is called
61 * testGetUFFieldSuccess and can be found in
62 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFFieldTest.php
64 * You can see the outcome of the API tests at
65 * https://test.civicrm.org/job/CiviCRM-master-git/
67 * To Learn about the API read
68 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
70 * Browse the api on your own site with the api explorer
71 * http://MYSITE.ORG/path/to/civicrm/api/explorer
73 * Read more about testing here
74 * http://wiki.civicrm.org/confluence/display/CRM/Testing
76 * API Standards documentation:
77 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards