}
/**
- * Given the list of params in the params array, fetch the object
- * and store the values in the values array
+ * Retrieve DB object and copy to defaults array.
*
* @param array $params
- * Input parameters to find object.
- * @param array $values
- * Output values of the object.
+ * Array of criteria values.
+ * @param array $defaults
+ * Array to be populated with found values.
+ *
+ * @return self|null
+ * The DAO object, if found.
*
- * @return array
- * values
+ * @deprecated
*/
- public static function retrieve(&$params, &$values) {
- $friend = new CRM_Friend_DAO_Friend();
- $friend->copyValues($params);
- $friend->find(TRUE);
- CRM_Core_DAO::storeValues($friend, $values);
- return $values;
+ public static function retrieve($params, &$defaults) {
+ return self::commonRetrieve(self::class, $params, $defaults);
}
/**