}
/**
- * 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 CRM_Core_BAO_MailSettings
+ * @return self|null
+ * The DAO object, if found.
+ *
+ * @deprecated
*/
- public static function retrieve(&$params, &$defaults) {
- $mailSettings = new CRM_Core_DAO_MailSettings();
- $mailSettings->copyValues($params);
-
- $result = NULL;
- if ($mailSettings->find(TRUE)) {
- CRM_Core_DAO::storeValues($mailSettings, $defaults);
- $result = $mailSettings;
- }
-
- return $result;
+ public static function retrieve($params, &$defaults) {
+ return self::commonRetrieve(self::class, $params, $defaults);
}
/**