$finalTree = [];
foreach ($allRoleIDs as $k => $v) {
- $roleGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL, $v, $roleCustomDataTypeID);
+ $roleGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL, $v, $roleCustomDataTypeID,
+ TRUE, NULL, FALSE, CRM_Core_Permission::VIEW);
$eventGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL,
- $values[$participantID]['event_id'], $eventNameCustomDataTypeID
+ $values[$participantID]['event_id'], $eventNameCustomDataTypeID,
+ TRUE, NULL, FALSE, CRM_Core_Permission::VIEW
);
$eventTypeID = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", $values[$participantID]['event_id'], 'event_type_id', 'id');
- $eventTypeGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL, $eventTypeID, $eventTypeCustomDataTypeID);
+ $eventTypeGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL, $eventTypeID, $eventTypeCustomDataTypeID,
+ TRUE, NULL, FALSE, CRM_Core_Permission::VIEW);
+ $participantGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL, [], NULL,
+ TRUE, NULL, FALSE, CRM_Core_Permission::VIEW);
$groupTree = CRM_Utils_Array::crmArrayMerge($roleGroupTree, $eventGroupTree);
$groupTree = CRM_Utils_Array::crmArrayMerge($groupTree, $eventTypeGroupTree);
- $groupTree = CRM_Utils_Array::crmArrayMerge($groupTree, CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID));
+ $groupTree = CRM_Utils_Array::crmArrayMerge($groupTree, $participantGroupTree);
foreach ($groupTree as $treeId => $trees) {
$finalTree[$treeId] = $trees;
}
$displayName = CRM_Contact_BAO_Contact::displayName($values[$participantID]['contact_id']);
$participantCount = [];
- $invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
- $invoicing = $invoiceSettings['invoicing'] ?? NULL;
$totalTaxAmount = 0;
foreach ($lineItem as $k => $v) {
if (CRM_Utils_Array::value('participant_count', $lineItem[$k]) > 0) {
}
$totalTaxAmount = $v['tax_amount'] + $totalTaxAmount;
}
- if ($invoicing) {
+ if (Civi::settings()->get('invoicing')) {
$this->assign('totalTaxAmount', $totalTaxAmount);
}
if ($participantCount) {
}
$this->assign('displayName', $displayName);
// omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
- CRM_Utils_System::setTitle(ts('View Event Registration for') . ' ' . $displayName);
+ $this->setTitle(ts('View Event Registration for') . ' ' . $displayName);
$roleId = $values[$participantID]['role_id'] ?? NULL;
$title = $displayName . ' (' . CRM_Utils_Array::value($roleId, $participantRoles) . ' - ' . $eventTitle . ')';