forked from CiviWare/org.agbu.annualgrantbudgets
convert to using a civix-generated entity
This commit is contained in:
@ -263,16 +263,17 @@ function _annualgrantbudgets_civix_find_files($dir, $pattern) {
|
||||
*/
|
||||
function _annualgrantbudgets_civix_civicrm_managed(&$entities) {
|
||||
$mgdFiles = _annualgrantbudgets_civix_find_files(__DIR__, '*.mgd.php');
|
||||
sort($mgdFiles);
|
||||
foreach ($mgdFiles as $file) {
|
||||
$es = include $file;
|
||||
foreach ($es as $e) {
|
||||
if (empty($e['module'])) {
|
||||
$e['module'] = E::LONG_NAME;
|
||||
}
|
||||
$entities[] = $e;
|
||||
if (empty($e['params']['version'])) {
|
||||
$e['params']['version'] = '3';
|
||||
}
|
||||
$entities[] = $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -453,6 +454,14 @@ function _annualgrantbudgets_civix_civicrm_alterSettingsFolders(&$metaDataFolder
|
||||
*
|
||||
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_entityTypes
|
||||
*/
|
||||
|
||||
function _annualgrantbudgets_civix_civicrm_entityTypes(&$entityTypes) {
|
||||
$entityTypes = array_merge($entityTypes, []);
|
||||
$entityTypes = array_merge($entityTypes, array (
|
||||
'CRM_AnnualGrantBudgets_DAO_GrantBudget' =>
|
||||
array (
|
||||
'name' => 'GrantBudget',
|
||||
'class' => 'CRM_AnnualGrantBudgets_DAO_GrantBudget',
|
||||
'table' => 'civicrm_grant_budget',
|
||||
),
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user