+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
}
_civicrm_api3_object_to_array($participantBAO, $participant[$participantBAO->id]);
- return civicrm_api3_create_success($participant, $params, 'participant', 'create', $participantBAO);
+ return civicrm_api3_create_success($participant, $params, 'Participant', 'create', $participantBAO);
}
/**
*/
function civicrm_api3_participant_get($params) {
$mode = CRM_Contact_BAO_Query::MODE_EVENT;
- $entity = 'participant';
- list($dao, $query) = _civicrm_api3_get_query_object($params, $mode, $entity);
+ list($dao, $query) = _civicrm_api3_get_query_object($params, $mode, 'Participant');
$participant = array();
while ($dao->fetch()) {
_civicrm_api3_custom_data_get($participant[$dao->participant_id], 'Participant', $dao->participant_id, NULL);
}
- return civicrm_api3_create_success($participant, $params, 'participant', 'get', $dao);
+ return civicrm_api3_create_success($participant, $params, 'Participant', 'get', $dao);
}
/**
* Array of parameters determined by getfields.
*/
function _civicrm_api3_participant_get_spec(&$params) {
- $params['participant_test']['api.default'] = 0;
- $params['participant_test']['title'] = 'Get Test Participants';
+ $params['participant_test'] = array(
+ 'api.default' => 0,
+ 'title' => 'Get Test Participants',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
}
/**