/**
* Business object for managing custom data groups.
*/
-class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup {
+class CRM_Core_BAO_CustomGroup extends CRM_Core_DAO_CustomGroup implements \Civi\Core\HookInterface {
+
+ /**
+ * @param \Civi\Core\Event\PostEvent $e
+ * @see CRM_Utils_Hook::post()
+ */
+ public static function self_hook_civicrm_post(\Civi\Core\Event\PostEvent $e): void {
+ Civi::cache('metadata')->flush();
+ }
/**
* Takes an associative array and creates a custom group object.
* @return array|int
* @throws \CRM_Core_Exception
*/
- public static function buildCustomDataView(&$form, $groupTree, $returnCount = FALSE, $gID = NULL, $prefix = NULL, $customValueId = NULL, $entityId = NULL, $checkEditPermission = FALSE) {
+ public static function buildCustomDataView($form, $groupTree, $returnCount = FALSE, $gID = NULL, $prefix = NULL, $customValueId = NULL, $entityId = NULL, $checkEditPermission = FALSE) {
// Filter out pesky extra info
unset($groupTree['info']);
}
}
else {
- $form->assign_by_ref("{$prefix}viewCustomData", $details);
+ $form->addExpectedSmartyVariables([
+ 'multiRecordDisplay',
+ 'groupId',
+ 'skipTitle',
+ ]);
+ $form->assign("{$prefix}viewCustomData", $details);
return $details;
}
}
$sel2['Campaign'] = $campaignTypes;
$sel2['Membership'] = $membershipType;
$sel2['ParticipantRole'] = $participantRole;
- $sel2['ParticipantEventName'] = CRM_Event_PseudoConstant::event(NULL, FALSE, "( is_template IS NULL OR is_template != 1 )");
+ $sel2['ParticipantEventName'] = CRM_Event_PseudoConstant::event(NULL, FALSE, "( is_template != 1 )");
$sel2['ParticipantEventType'] = $eventType;
$sel2['Contribution'] = CRM_Contribute_PseudoConstant::financialType();
$sel2['Relationship'] = CRM_Custom_Form_Group::getRelationshipTypes();