コード例 #1
0
 /** 
  * Generate html code to visualize the executed match.
  * 
  * @val $match    match data as previously generated by this plugin instance
  * @val $btx      the bank transaction the match refers to
  * @return html code snippet
  */
 function visualize_execution_info(CRM_Banking_Matcher_Suggestion $match, $btx)
 {
     if ($match->getId() === "manual") {
         $cids = $match->getParameter('contribution_ids');
         $text = "<p>" . ts("This transaction was manually matched to the following contributions:") . "<ul>";
         foreach ($cids as $contribution_id) {
             if ($contribution_id) {
                 $contribution_link = CRM_Utils_System::url("civicrm/contact/view/contribution", "action=view&reset=1&id={$contribution_id}&cid=2&context=home");
                 $text .= "<li><a href=\"{$contribution_link}\">" . ts("Contribution") . " #{$contribution_id}</a>";
             }
         }
         $text .= "</ul>";
         return $text;
     }
 }