Merge pull request #23508 from eileenmcnaughton/import_subkid
[civicrm-core.git] / CRM / Event / BAO / ParticipantStatusType.php
index d22b54d887a470e7702019a7ee82d9e5c9ed0c80..bd773993e51f0778556eb7bd1440317a6038a34e 100644 (file)
@@ -71,22 +71,20 @@ class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatu
   }
 
   /**
+   * Retrieve DB object and copy to defaults array.
+   *
    * @param array $params
-   * @param $defaults
+   *   Array of criteria values.
+   * @param array $defaults
+   *   Array to be populated with found values.
+   *
+   * @return self|null
+   *   The DAO object, if found.
    *
-   * @return CRM_Event_DAO_ParticipantStatusType|null
+   * @deprecated
    */
-  public static function retrieve(&$params, &$defaults) {
-    $result = NULL;
-
-    $dao = new CRM_Event_DAO_ParticipantStatusType();
-    $dao->copyValues($params);
-    if ($dao->find(TRUE)) {
-      CRM_Core_DAO::storeValues($dao, $defaults);
-      $result = $dao;
-    }
-
-    return $result;
+  public static function retrieve($params, &$defaults) {
+    return self::commonRetrieve(self::class, $params, $defaults);
   }
 
   /**