コード例 #1
0
 /**
  * @param $id
  *
  * @return mixed
  */
 function delete($id)
 {
     $paymentProcessor = new CRM_Financial_DAO_PaymentProcessor();
     $paymentProcessor->id = $id;
     if ($paymentProcessor->find(TRUE)) {
         $result = $paymentProcessor->delete();
     }
     return $result;
 }
コード例 #2
0
ファイル: PaymentProcessor.php プロジェクト: hguru/224Civi
 /**
  * Function  to delete payment processor
  *
  * @param  int  $paymentProcessorId     ID of the processor to be deleted.
  *
  * @access public
  * @static
  */
 static function del($paymentProcessorID)
 {
     if (!$paymentProcessorID) {
         CRM_Core_Error::fatal(ts('Invalid value passed to delete function'));
     }
     $dao = new CRM_Financial_DAO_PaymentProcessor();
     $dao->id = $paymentProcessorID;
     if (!$dao->find(TRUE)) {
         return NULL;
     }
     $testDAO = new CRM_Financial_DAO_PaymentProcessor();
     $testDAO->name = $dao->name;
     $testDAO->is_test = 1;
     $testDAO->delete();
     $dao->delete();
 }