/** * Function to get list of pledges In Honor of contact Ids * * @param int $honorId In Honor of Contact ID * * @return return the list of pledge fields * * @access public * @static */ static function getHonorContacts($honorId) { $params = array(); $honorDAO = new CRM_Pledge_DAO_Pledge(); $honorDAO->honor_contact_id = $honorId; $honorDAO->find(); //get all status. while ($honorDAO->fetch()) { $params[$honorDAO->id] = array('honorId' => $honorDAO->contact_id, 'amount' => $honorDAO->amount, 'status' => CRM_Contribute_PseudoConstant::contributionStatus($honorDAO->status_id), 'create_date' => $honorDAO->create_date, 'acknowledge_date' => $honorDAO->acknowledge_date, 'type' => CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $honorDAO->financial_type_id, 'name'), 'display_name' => CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $honorDAO->contact_id, 'display_name')); } return $params; }