}
/**
- * Retrieve DB object based on input parameters.
- *
- * It also stores all the retrieved values in the default array.
+ * Retrieve DB object and copy to defaults array.
*
* @param array $params
- * (reference ) an assoc array of name/value pairs.
+ * Array of criteria values.
* @param array $defaults
- * (reference ) an assoc array to hold the flattened values.
+ * Array to be populated with found values.
+ *
+ * @return self|null
+ * The DAO object, if found.
*
- * @return CRM_Pledge_BAO_PledgePayment
+ * @deprecated
*/
- 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;
+ public static function retrieve($params, &$defaults) {
+ return self::commonRetrieve(self::class, $params, $defaults);
}
/**
*
* @param array $params
*
- * @return array
- * Next scheduled date as an array
+ * @return string
+ * Next scheduled date in the format YmdHis
*/
public static function calculateBaseScheduleDate(&$params) {
$date = [];