-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24164 from herbdool/core-3783
dev/core#3783 convert Recent Items providers into an option group
- Loading branch information
Showing
4 changed files
with
103 additions
and
19 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
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
41 changes: 41 additions & 0 deletions
41
ext/civigrant/managed/OptionGroup_recent_items_providers_OptionValue_Grant.mgd.php
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,41 @@ | ||
<?php | ||
use CRM_Grant_ExtensionUtil as E; | ||
|
||
// Prevent errors during upgrades from < 5.53 that don't yet have the option group | ||
$optionGroup = \Civi\Api4\OptionGroup::get(FALSE) | ||
->addWhere('name', '=', 'recent_items_providers') | ||
->selectRowCount() | ||
->execute(); | ||
if (!$optionGroup->count()) { | ||
return []; | ||
} | ||
|
||
return [ | ||
[ | ||
'name' => 'OptionGroup_recent_items_providers_OptionValue_Grant', | ||
'entity' => 'OptionValue', | ||
'cleanup' => 'always', | ||
'update' => 'always', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'option_group_id.name' => 'recent_items_providers', | ||
'label' => E::ts('Grants'), | ||
'value' => 'Grant', | ||
'name' => 'Grants', | ||
'grouping' => NULL, | ||
'filter' => 0, | ||
'is_default' => FALSE, | ||
'description' => NULL, | ||
'is_optgroup' => FALSE, | ||
'is_reserved' => FALSE, | ||
'is_active' => TRUE, | ||
'icon' => NULL, | ||
'color' => NULL, | ||
'component_id' => NULL, | ||
'domain_id' => NULL, | ||
'visibility_id' => NULL, | ||
], | ||
], | ||
], | ||
]; |
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