-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add managed option values for
tag_used_for
option group for each EC…
…K entity type
- Loading branch information
1 parent
fc63ad0
commit 87fc164
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
// Auto-generate managed records for each entity type | ||
$values = []; | ||
foreach (CRM_Eck_BAO_EckEntityType::getEntityTypes() as $type) { | ||
// Synchronize tag_used_for option values. | ||
$values[] = [ | ||
'name' => 'tag_used_for:' . $type['name'], | ||
'entity' => 'OptionValue', | ||
'cleanup' => 'always', | ||
'update' => 'always', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'option_group_id.name' => 'tag_used_for', | ||
'label' => $type['label'], | ||
'value' => $type['table_name'], | ||
'name' => $type['entity_name'], | ||
'is_reserved' => TRUE, | ||
'is_active' => TRUE, | ||
], | ||
], | ||
]; | ||
} | ||
return $values; |