Ejemplo n.º 1
0
 /**
  * Retrieve DB object based on input parameters.
  *
  * It also stores all the retrieved values in the default array.
  *
  * @param array $params
  *   (reference ) an assoc array of name/value pairs.
  * @param array $defaults
  *   (reference ) an assoc array to hold the flattened values.
  *
  * @return CRM_Pledge_BAO_PledgePayment
  */
 public static function retrieve(&$params, &$defaults)
 {
     $payment = new CRM_Pledge_BAO_PledgePayment();
     $payment->copyValues($params);
     if ($payment->find(TRUE)) {
         CRM_Core_DAO::storeValues($payment, $defaults);
         return $payment;
     }
     return NULL;
 }