*
* @throws API_Exception
* @return array
- * Array containing 'is_error' to denote success or failure and details of the created activity.
+ * API result array
*/
function civicrm_api3_activity_create($params) {
$params['assignee_contact_id'] = array(
'name' => 'assignee_id',
- 'title' => 'assigned to',
+ 'title' => 'Activity Assignee',
+ 'description' => 'Contact(s) assigned to this activity.',
'type' => 1,
- 'FKClassName' => 'CRM_Activity_DAO_ActivityContact',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'FKApiName' => 'Contact',
);
$params['target_contact_id'] = array(
'name' => 'target_id',
'title' => 'Activity Target',
+ 'description' => 'Contact(s) participating in this activity.',
'type' => 1,
- 'FKClassName' => 'CRM_Activity_DAO_ActivityContact',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'FKApiName' => 'Contact',
);
$params['source_contact_id'] = array(
'name' => 'source_contact_id',
'title' => 'Activity Source Contact',
+ 'description' => 'Person who created this activity. Defaults to current user.',
'type' => 1,
- 'FKClassName' => 'CRM_Activity_DAO_ActivityContact',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
'api.default' => 'user_contact_id',
+ 'FKApiName' => 'Contact',
+ );
+
+ $params['case_id'] = array(
+ 'name' => 'case_id',
+ 'title' => 'Case ID',
+ 'description' => 'For creating an activity as part of a case.',
+ 'type' => 1,
+ 'FKClassName' => 'CRM_Case_DAO_Case',
+ 'FKApiName' => 'Case',
);
}
* Array per getfields documentation.
*
* @return array
+ * API result array
*/
function civicrm_api3_activity_get($params) {
if (!empty($params['contact_id'])) {
}
}
else {
- $activities = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, FALSE);
+ $activities = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, FALSE, 'Activity');
}
$options = _civicrm_api3_get_options_from_params($params, FALSE, 'Activity', 'get');
if ($options['is_count']) {
* @throws API_Exception
*
* @return array
+ * API result array
*/
function civicrm_api3_activity_delete($params) {