- $batchSummary = [
- 'created_by' => CRM_Contact_BAO_Contact::displayName($batchInfo->created_id),
- 'status' => CRM_Core_PseudoConstant::getLabel('CRM_Batch_BAO_Batch', 'status_id', $batchInfo->status_id),
- 'description' => $batchInfo->description,
- 'payment_instrument' => CRM_Core_PseudoConstant::getLabel('CRM_Batch_BAO_Batch', 'payment_instrument_id', $batchInfo->payment_instrument_id),
- 'item_count' => $batchInfo->item_count,
+ return [
+ 'created_by' => $batchInfo['created_id.display_name'],
+ 'status' => $batchInfo['status_id:label'],
+ 'description' => $batchInfo['description'],
+ 'payment_instrument' => $batchInfo['payment_instrument_id:label'],
+ 'item_count' => $batchInfo['item_count'],