4 Criteria delete by nesting a GET & a DELETE
6 function participant_get_example(){
10 'api.participant.delete' => 1,
13 $result = civicrm_api( 'participant','Get',$params );
19 * Function returns array of result expected from previous function
21 function participant_get_expectedresult(){
23 $expectedResult = array(
30 'contact_type' => 'Individual',
31 'contact_sub_type' => '',
32 'sort_name' => 'Anderson, Anthony',
33 'display_name' => 'Mr. Anthony Anderson II',
35 'event_title' => 'Annual CiviCRM meet',
36 'event_start_date' => '2008-10-21 00:00:00',
37 'event_end_date' => '2008-10-23 00:00:00',
38 'participant_id' => '2',
39 'participant_fee_level' => '',
40 'participant_fee_amount' => '',
41 'participant_fee_currency' => '',
42 'event_type' => 'Conference',
43 'participant_status_id' => '2',
44 'participant_status' => 'Attended',
45 'participant_role_id' => '1',
46 'participant_register_date' => '2007-02-19 00:00:00',
47 'participant_source' => 'Wimbeldon',
48 'participant_note' => '',
49 'participant_is_pay_later' => 0,
50 'participant_is_test' => 0,
51 'participant_registered_by_id' => '',
52 'participant_discount_name' => '',
53 'participant_campaign_id' => '',
55 'api.participant.delete' => array(
64 'contact_type' => 'Individual',
65 'contact_sub_type' => '',
66 'sort_name' => 'Anderson, Anthony',
67 'display_name' => 'Mr. Anthony Anderson II',
69 'event_title' => 'Annual CiviCRM meet',
70 'event_start_date' => '2008-10-21 00:00:00',
71 'event_end_date' => '2008-10-23 00:00:00',
72 'participant_id' => '3',
73 'participant_fee_level' => '',
74 'participant_fee_amount' => '',
75 'participant_fee_currency' => '',
76 'event_type' => 'Conference',
77 'participant_status_id' => '2',
78 'participant_status' => 'Attended',
79 'participant_role_id' => '1',
80 'participant_register_date' => '2007-02-19 00:00:00',
81 'participant_source' => 'Wimbeldon',
82 'participant_note' => '',
83 'participant_is_pay_later' => 0,
84 'participant_is_test' => 0,
85 'participant_registered_by_id' => '',
86 'participant_discount_name' => '',
87 'participant_campaign_id' => '',
89 'api.participant.delete' => array(
99 return $expectedResult ;
104 * This example has been generated from the API test suite. The test that created it is called
106 * testNestedDelete and can be found in
107 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ParticipantTest.php
109 * You can see the outcome of the API tests at
110 * http://tests.dev.civicrm.org/trunk/results-api_v3
112 * To Learn about the API read
113 * http://book.civicrm.org/developer/current/techniques/api/
115 * and review the wiki at
116 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
118 * Read more about testing here
119 * http://wiki.civicrm.org/confluence/display/CRM/Testing
121 * API Standards documentation:
122 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards