/** * Retrieve the information about the batch. * * @param array $params * (reference ) an assoc array of name/value pairs. * @param array $defaults * (reference ) an assoc array to hold the flattened values. * * @return array * CRM_Batch_BAO_Batch object on success, null otherwise */ public static function retrieve(&$params, &$defaults) { $batch = new CRM_Batch_DAO_Batch(); $batch->copyValues($params); if ($batch->find(TRUE)) { CRM_Core_DAO::storeValues($batch, $defaults); return $batch; } return NULL; }