4 Demonstrates use of 'filter' active_only' param
6 function membership_get_example(){
15 $result = civicrm_api( 'membership','get',$params );
21 * Function returns array of result expected from previous function
23 function membership_get_expectedresult(){
25 $expectedResult = array(
33 'membership_id' => '1',
35 'membership_contact_id' => '13',
36 'membership_type_id' => '11',
37 'join_date' => '2009-01-21',
38 'start_date' => '2009-01-21',
39 'membership_start_date' => '2009-01-21',
40 'end_date' => '2009-12-21',
41 'membership_end_date' => '2009-12-21',
42 'source' => 'Payment',
43 'membership_source' => 'Payment',
47 'member_is_test' => 0,
49 'member_is_pay_later' => 0,
50 'membership_name' => 'General',
51 'relationship_name' => 'Child of',
56 return $expectedResult ;
61 * This example has been generated from the API test suite. The test that created it is called
63 * testGetOnlyActive and can be found in
64 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MembershipTest.php
66 * You can see the outcome of the API tests at
67 * http://tests.dev.civicrm.org/trunk/results-api_v3
69 * To Learn about the API read
70 * http://book.civicrm.org/developer/current/techniques/api/
72 * and review the wiki at
73 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
75 * Read more about testing here
76 * http://wiki.civicrm.org/confluence/display/CRM/Testing
78 * API Standards documentation:
79 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards