From 9bed436a81ac3f8bb6894bdea990e412b6eae4b2 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 5 Dec 2021 19:58:32 -0500 Subject: [PATCH] Afform - Use APIv4 for managed dashboard --- ext/afform/core/afform.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ext/afform/core/afform.php b/ext/afform/core/afform.php index 8b73fa2c31..e8bc897c43 100644 --- a/ext/afform/core/afform.php +++ b/ext/afform/core/afform.php @@ -159,14 +159,17 @@ function afform_civicrm_managed(&$entities) { // ideal cleanup policy might be to (a) deactivate if used and (b) remove if unused 'cleanup' => 'always', 'params' => [ - 'version' => 3, - // Q: Should we loop through all domains? - 'domain_id' => CRM_Core_BAO_Domain::getDomain()->id, - 'is_active' => TRUE, - 'name' => $afform['name'], - 'label' => $afform['title'] ?? E::ts('(Untitled)'), - 'directive' => _afform_angular_module_name($afform['name'], 'dash'), - 'permission' => "@afform:" . $afform['name'], + 'version' => 4, + 'values' => [ + // Q: Should we loop through all domains? + 'domain_id' => 'current_domain', + 'is_active' => TRUE, + 'name' => $afform['name'], + 'label' => $afform['title'] ?? E::ts('(Untitled)'), + 'directive' => _afform_angular_module_name($afform['name'], 'dash'), + 'permission' => "@afform:" . $afform['name'], + 'url' => NULL, + ], ], ]; } -- 2.25.1