4 Create entities and location block in 1 api call
6 function loc_block_createentities_example(){
10 'location_type_id' => 1,
11 'email' => 'test2@loc.block',
14 'location_type_id' => 1,
15 'phone' => '987654321',
18 'location_type_id' => 1,
19 'phone' => '456-7890',
22 'location_type_id' => 1,
23 'street_address' => '987654321',
27 $result = civicrm_api( 'loc_block','createEntities',$params );
33 * Function returns array of result expected from previous function
35 function loc_block_createentities_expectedresult(){
37 $expectedResult = array(
46 'location_type_id' => '1',
49 'street_address' => '987654321',
50 'manual_geo_code' => 0,
54 'contact_id' => 'null',
55 'location_type_id' => '1',
56 'email' => 'test2@loc.block',
63 'signature_text' => '',
64 'signature_html' => '',
68 'contact_id' => 'null',
69 'location_type_id' => '1',
72 'mobile_provider_id' => '',
73 'phone' => '987654321',
75 'phone_numeric' => '',
76 'phone_type_id' => '',
80 'contact_id' => 'null',
81 'location_type_id' => '1',
84 'mobile_provider_id' => '',
85 'phone' => '456-7890',
87 'phone_numeric' => '',
88 'phone_type_id' => '',
103 return $expectedResult ;
108 * This example has been generated from the API test suite. The test that created it is called
110 * testCreateLocBlockEntities and can be found in
111 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/LocBlockTest.php
113 * You can see the outcome of the API tests at
114 * http://tests.dev.civicrm.org/trunk/results-api_v3
116 * To Learn about the API read
117 * http://book.civicrm.org/developer/current/techniques/api/
119 * and review the wiki at
120 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
122 * Read more about testing here
123 * http://wiki.civicrm.org/confluence/display/CRM/Testing
125 * API Standards documentation:
126 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards