<?php
/**
- * Test Generated example of using contact GetFields API.
+ * Test Generated example demonstrating the Contact.getfields API.
*
* Demonstrates retrieving metadata with custom field options.
*
);
try{
- $result = civicrm_api3('contact', 'GetFields', $params);
+ $result = civicrm_api3('Contact', 'getfields', $params);
}
catch (CiviCRM_API3_Exception $e) {
// Handle error here.
'is_deceased' => array(
'name' => 'is_deceased',
'type' => 16,
- 'title' => 'Is Deceased',
+ 'title' => 'Deceased',
'import' => TRUE,
'where' => 'civicrm_contact.is_deceased',
'headerPattern' => '/i(s\\s)?d(eceased)$/i',
'source' => array(
'name' => 'source',
'type' => 2,
- 'title' => 'Source of Contact Data',
+ 'title' => 'Contact Source',
'maxlength' => 255,
'size' => 30,
'import' => TRUE,
return $expectedResult;
}
-/**
+/*
* This example has been generated from the API test suite.
-* The test that created it is called
-* testCustomFieldCreateWithOptionValues
-* and can be found in
+* The test that created it is called "testCustomFieldCreateWithOptionValues"
+* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at