Skip to content
Snippets Groups Projects
Commit 77a09963 authored by mattwire's avatar mattwire
Browse files

Switch to mgd files to define cg_extend_objects

parent 07bb22e0
No related branches found
No related tags found
No related merge requests found
<?php
use Civi\Api4\OptionValue;
if (empty(OptionValue::get(FALSE)
->addWhere('option_group_id:name', '=', 'cg_extend_objects')
->addWhere('value', '=', 'FinancialTrxn')
->execute()
->first())) {
return [
[
'name' => 'cg_extend_objects:FinancialTrxn',
'entity' => 'OptionValue',
'cleanup' => 'unused',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
'option_group_id.name' => 'cg_extend_objects',
'label' => ts('Financial Transaction (Payment)'),
'value' => 'FinancialTrxn',
'name' => 'civicrm_financial_trxn',
'is_reserved' => TRUE,
'is_active' => TRUE,
],
],
'match' => ['option_group_id', 'name'],
],
];
}
\ No newline at end of file
......@@ -3,24 +3,6 @@ use CRM_Mjwshared_ExtensionUtil as E;
// This enables custom fields for FinancialTrxn entities
return [
[
'name' => 'cg_extend_objects:FinancialTrxn',
'entity' => 'OptionValue',
'cleanup' => 'unused',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
'option_group_id.name' => 'cg_extend_objects',
'label' => E::ts('Financial Transaction (Payment)'),
'value' => 'FinancialTrxn',
'name' => 'civicrm_financial_trxn',
'is_reserved' => TRUE,
'is_active' => TRUE,
],
],
'match' => ['option_group_id', 'name'],
],
[
'name' => 'CustomGroup_Payment_details',
'entity' => 'CustomGroup',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment