updated code to use defined variable
This commit is contained in:
parent
e177d11f36
commit
1e50c06c5b
@ -3,6 +3,9 @@
|
|||||||
require_once 'annualgrantbudgets.civix.php';
|
require_once 'annualgrantbudgets.civix.php';
|
||||||
use CRM_Annualgrantbudgets_ExtensionUtil as E;
|
use CRM_Annualgrantbudgets_ExtensionUtil as E;
|
||||||
|
|
||||||
|
define('GRANT_SCHOLARSHIP_CUSTOM_GROUP', 'grant_scholarship');
|
||||||
|
define('GRANT_SCHOLARSHIP_CUSTOM_FIELD', 'is_grant_scholarship');
|
||||||
|
define('GRANT_SCHOLARSHIP_CUSTOM_TABLE_NAME', 'civicrm_value_grant_scholarship');
|
||||||
/**
|
/**
|
||||||
* Implements hook_civicrm_config().
|
* Implements hook_civicrm_config().
|
||||||
*
|
*
|
||||||
@ -90,11 +93,11 @@ function annualgrantbudgets_civicrm_managed(&$entities) {
|
|||||||
_annualgrantbudgets_civix_civicrm_managed($entities);
|
_annualgrantbudgets_civix_civicrm_managed($entities);
|
||||||
$entities[] = [
|
$entities[] = [
|
||||||
'module' => 'org.agbu.annualgrantbudgets',
|
'module' => 'org.agbu.annualgrantbudgets',
|
||||||
'name' => 'grant_scholarship',
|
'name' => GRANT_SCHOLARSHIP_CUSTOM_GROUP,
|
||||||
'entity' => 'CustomGroup',
|
'entity' => 'CustomGroup',
|
||||||
'params' => [
|
'params' => [
|
||||||
'version' => 3,
|
'version' => 3,
|
||||||
'name' => 'grant_scholarship',
|
'name' => GRANT_SCHOLARSHIP_CUSTOM_GROUP,
|
||||||
'title' => ts('Grant Scholarship'),
|
'title' => ts('Grant Scholarship'),
|
||||||
'extends' => 'FinancialType',
|
'extends' => 'FinancialType',
|
||||||
'style' => 'Inline',
|
'style' => 'Inline',
|
||||||
@ -103,15 +106,16 @@ function annualgrantbudgets_civicrm_managed(&$entities) {
|
|||||||
'is_multiple' => FALSE,
|
'is_multiple' => FALSE,
|
||||||
'collapse_adv_display' => FALSE,
|
'collapse_adv_display' => FALSE,
|
||||||
'is_reserved' => TRUE,
|
'is_reserved' => TRUE,
|
||||||
|
'table_name' => GRANT_SCHOLARSHIP_CUSTOM_TABLE_NAME,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
$entities[] = [
|
$entities[] = [
|
||||||
'module' => 'org.agbu.annualgrantbudgets',
|
'module' => 'org.agbu.annualgrantbudgets',
|
||||||
'name' => 'is_grant_scholarship',
|
'name' => GRANT_SCHOLARSHIP_CUSTOM_FIELD,
|
||||||
'entity' => 'CustomField',
|
'entity' => 'CustomField',
|
||||||
'params' => [
|
'params' => [
|
||||||
'version' => 3,
|
'version' => 3,
|
||||||
'name' => 'is_grant_scholarship',
|
'name' => GRANT_SCHOLARSHIP_CUSTOM_FIELD,
|
||||||
'label' => ts('Scholarship?'),
|
'label' => ts('Scholarship?'),
|
||||||
'data_type' => 'Boolean',
|
'data_type' => 'Boolean',
|
||||||
'html_type' => 'Radio',
|
'html_type' => 'Radio',
|
||||||
@ -121,8 +125,8 @@ function annualgrantbudgets_civicrm_managed(&$entities) {
|
|||||||
'default_value' => '0',
|
'default_value' => '0',
|
||||||
'is_active' => TRUE,
|
'is_active' => TRUE,
|
||||||
'text_length' => 255,
|
'text_length' => 255,
|
||||||
'column_name' => 'is_grant_scholarship',
|
'column_name' => GRANT_SCHOLARSHIP_CUSTOM_FIELD,
|
||||||
'custom_group_id' => 'grant_scholarship',
|
'custom_group_id' => GRANT_SCHOLARSHIP_CUSTOM_GROUP,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user