Merge pull request #1046 from colemanw/showHide
[civicrm-core.git] / api / v3 / examples / Setting / GetSpecifiedDomains.php
1 <?php
2
3 /*
4 shows getting a variable for specified domains
5 */
6 function setting_get_example(){
7 $params = array(
8 'version' => 3,
9 'domain_id' => array(
10 '0' => 1,
11 '1' => 2,
12 ),
13 'return' => array(
14 '0' => 'uniq_email_per_site',
15 ),
16 );
17
18 $result = civicrm_api( 'setting','Get',$params );
19
20 return $result;
21 }
22
23 /*
24 * Function returns array of result expected from previous function
25 */
26 function setting_get_expectedresult(){
27
28 $expectedResult = array(
29 'is_error' => 0,
30 'version' => 3,
31 'count' => 2,
32 'values' => array(
33 '1' => array(
34 'uniq_email_per_site' => 0,
35 ),
36 '2' => array(
37 'uniq_email_per_site' => '1',
38 ),
39 ),
40 );
41
42 return $expectedResult ;
43 }
44
45
46 /*
47 * This example has been generated from the API test suite. The test that created it is called
48 *
49 * testCreateSettingMultipleDomains and can be found in
50 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/SettingTest.php
51 *
52 * You can see the outcome of the API tests at
53 * http://tests.dev.civicrm.org/trunk/results-api_v3
54 *
55 * To Learn about the API read
56 * http://book.civicrm.org/developer/current/techniques/api/
57 *
58 * and review the wiki at
59 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
60 *
61 * Read more about testing here
62 * http://wiki.civicrm.org/confluence/display/CRM/Testing
63 *
64 * API Standards documentation:
65 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
66 */