Skip to content

Commit 16f4cd2

Browse files
committed
CustomData - Move cg_extends from installer to managed
Before: 3 ways this is declared: installer data, managed data, and hardcoded arrays in getCustomGroupExtendsOptions() After: 2 ways. Installer data moved to managed data
1 parent 16fd023 commit 16f4cd2

5 files changed

Lines changed: 58 additions & 18 deletions

File tree

deleted-files-list.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,7 @@
13641364
"setup/res/template.php",
13651365
"sql/civicrm_arms_sample_data.sql",
13661366
"sql/civicrm_data/civicrm_action_mapping.sqldata.php",
1367+
"sql/civicrm_data/civicrm_option_group/cg_extend_objects.sqldata.php",
13671368
"sql/civicrm_data/civicrm_option_group/from_email_address.sqldata.php",
13681369
"sql/civicrm_option_groups.php",
13691370
"sql/civicrm_option_groups/*",
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
use CRM_Contribute_ExtensionUtil as E;
3+
4+
// This enables custom fields for Survey entities
5+
return [
6+
[
7+
'name' => 'cg_extend_objects:Survey',
8+
'entity' => 'OptionValue',
9+
'cleanup' => 'always',
10+
'update' => 'always',
11+
'params' => [
12+
'version' => 4,
13+
'values' => [
14+
'option_group_id.name' => 'cg_extend_objects',
15+
'label' => E::ts('Survey'),
16+
'value' => 'Survey',
17+
'name' => 'civicrm_survey',
18+
'is_reserved' => TRUE,
19+
'is_active' => TRUE,
20+
'grouping' => NULL,
21+
],
22+
'match' => [
23+
'name',
24+
'option_group_id',
25+
],
26+
],
27+
],
28+
];

ext/civi_case/info.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
</classloader>
4040
<mixins>
4141
<mixin>ang-php@1.0.0</mixin>
42+
<mixin>mgd-php@2.0.0</mixin>
4243
<mixin>setting-php@1.0.0</mixin>
4344
<mixin>scan-classes@1.0.0</mixin>
4445
</mixins>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
use CRM_Contribute_ExtensionUtil as E;
3+
4+
// This enables custom fields for Case entities
5+
return [
6+
[
7+
'name' => 'cg_extend_objects:Case',
8+
'entity' => 'OptionValue',
9+
'cleanup' => 'always',
10+
'update' => 'always',
11+
'params' => [
12+
'version' => 4,
13+
'values' => [
14+
'option_group_id.name' => 'cg_extend_objects',
15+
'label' => E::ts('Cases'),
16+
'value' => 'Case',
17+
'name' => 'civicrm_case',
18+
'is_reserved' => TRUE,
19+
'is_active' => TRUE,
20+
'grouping' => 'case_type_id',
21+
],
22+
'match' => [
23+
'name',
24+
'option_group_id',
25+
],
26+
],
27+
],
28+
];

sql/civicrm_data/civicrm_option_group/cg_extend_objects.sqldata.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)