4 Create entities and location block in 1 api call
6 function loc_block_createentities_example(){
9 'location_type_id' => 1,
10 'email' => 'test2@loc.block',
13 'location_type_id' => 1,
14 'phone' => '987654321',
17 'location_type_id' => 1,
18 'phone' => '456-7890',
21 'location_type_id' => 1,
22 'street_address' => '987654321',
28 $result = civicrm_api( 'loc_block','createEntities',$params );
34 * Function returns array of result expected from previous function
36 function loc_block_createentities_expectedresult(){
38 $expectedResult = array(
47 'location_type_id' => '1',
50 'street_address' => '987654321',
51 'manual_geo_code' => 0,
55 'contact_id' => 'null',
56 'location_type_id' => '1',
57 'email' => 'test2@loc.block',
64 'signature_text' => '',
65 'signature_html' => '',
69 'contact_id' => 'null',
70 'location_type_id' => '1',
73 'mobile_provider_id' => '',
74 'phone' => '987654321',
76 'phone_numeric' => '',
77 'phone_type_id' => '',
81 'contact_id' => 'null',
82 'location_type_id' => '1',
85 'mobile_provider_id' => '',
86 'phone' => '456-7890',
88 'phone_numeric' => '',
89 'phone_type_id' => '',
104 return $expectedResult ;
109 * This example has been generated from the API test suite. The test that created it is called
111 * testCreateLocBlockEntities and can be found in
112 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/LocBlockTest.php
114 * You can see the outcome of the API tests at
115 * http://tests.dev.civicrm.org/trunk/results-api_v3
117 * To Learn about the API read
118 * http://book.civicrm.org/developer/current/techniques/api/
120 * and review the wiki at
121 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
123 * Read more about testing here
124 * http://wiki.civicrm.org/confluence/display/CRM/Testing
126 * API Standards documentation:
127 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards