Skip to content
Snippets Groups Projects
Unverified Commit 9a03a0ed authored by karing's avatar karing Committed by GitHub
Browse files

Merge pull request #719 from colemanw/civigrant

Civigrant
parents d69267ca fd6b5196
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,17 @@ class Fields implements FieldsInterface {
'activity' => ['entity_type' => 'activity', 'label' => t('Activity'), 'max_instances' => 99, 'attachments' => TRUE],
'relationship' => ['entity_type' => 'contact', 'label' => t('Relationship'), 'help_text' => TRUE, 'custom_fields' => 'combined'],
];
$civicrm_version = $this->utils->wf_crm_apivalues('System', 'get')[0]['version'];
// Grant is moved to extension after > 5.47.0.
if (version_compare($civicrm_version, '5.47') >= 0) {
$components = array_diff($components, ['CiviGrant']);
$grantStatus = $this->utils->wf_crm_apivalues('Extension', 'get', [
'full_name' => 'civigrant'
], 'status');
if (array_pop($grantStatus) == 'installed') {
$components[] = 'CiviGrant';
}
}
$conditional_sets = [
'CiviCase' => ['entity_type' => 'case', 'label' => t('Case'), 'max_instances' => 30],
'CiviEvent' => ['entity_type' => 'participant', 'label' => t('Participant'), 'max_instances' => 9],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment