CiviGrant - Add missing note_used_for metadata
authorcolemanw <coleman@civicrm.org>
Wed, 13 Sep 2023 01:22:55 +0000 (21:22 -0400)
committercolemanw <coleman@civicrm.org>
Wed, 13 Sep 2023 01:22:55 +0000 (21:22 -0400)
ext/civigrant/managed/OptionValue_note_used_for_grant.mgd.php [new file with mode: 0644]

diff --git a/ext/civigrant/managed/OptionValue_note_used_for_grant.mgd.php b/ext/civigrant/managed/OptionValue_note_used_for_grant.mgd.php
new file mode 100644 (file)
index 0000000..2976588
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+use CRM_Grant_ExtensionUtil as E;
+
+// This enables custom fields for Grant entities
+return [
+  [
+    'name' => 'note_used_for:Grant',
+    'entity' => 'OptionValue',
+    'cleanup' => 'always',
+    'update' => 'always',
+    'params' => [
+      'version' => 4,
+      'values' => [
+        'option_group_id.name' => 'note_used_for',
+        'label' => E::ts('Grants'),
+        'value' => 'civicrm_grant',
+        'name' => 'Grant',
+        'is_reserved' => TRUE,
+        'is_active' => TRUE,
+      ],
+      'match' => [
+        'name',
+        'option_group_id',
+      ],
+    ],
+  ],
+];