}
/**
+ * @deprecated - use the api instead.
+ *
* Get the Activities of a target contact.
*
* @param int $contactId
* array of activity fields
*/
public static function getContactActivity($contactId) {
+ // @todo remove this function entirely.
$activities = array();
$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
$sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
if (CRM_Utils_System::getClassName($form) == 'CRM_Activity_Form_Task_SMS') {
//to check for "if the contact id belongs to a specified activity type"
+ // @todo use the api instead - function is deprecated.
$actDetails = CRM_Activity_BAO_Activity::getContactActivity($contactId);
if (self::RECIEVED_SMS_ACTIVITY_SUBJECT !=
CRM_Utils_Array::retrieveValueRecursive($actDetails, 'subject')
'subject', 'Database check for created activity.'
);
+ // @todo - remove this deprecated functions
$activities = CRM_Activity_BAO_Activity::getContactActivity($targetContactId);
$this->assertEquals($activities[$activityId]['subject'], 'Scheduling Meeting', 'Verify activity subject is correct.');