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