Added xml file for schema

This commit is contained in:
civiwaresolution
2019-09-19 22:54:14 +01:00
committed by Pradeep Nayak
parent 5596e9b90b
commit ae5edc1f48
6 changed files with 266 additions and 91 deletions

View File

@ -6,10 +6,10 @@
* The ExtensionUtil class provides small stubs for accessing resources of this
* extension.
*/
class CRM_Relateentities_ExtensionUtil {
class CRM_RelateEntities_ExtensionUtil {
const SHORT_NAME = "relateentities";
const LONG_NAME = "com.megaphonetech.relateentities";
const CLASS_PREFIX = "CRM_Relateentities";
const CLASS_PREFIX = "CRM_RelateEntities";
/**
* Translate a string using the extension's domain.
@ -77,7 +77,7 @@ class CRM_Relateentities_ExtensionUtil {
}
use CRM_Relateentities_ExtensionUtil as E;
use CRM_RelateEntities_ExtensionUtil as E;
/**
* (Delegated) Implements hook_civicrm_config().
@ -193,7 +193,8 @@ function _relateentities_civix_civicrm_disable() {
* @param $op string, the type of operation being performed; 'check' or 'enqueue'
* @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks
*
* @return mixed
* @return mixed based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
* for 'enqueue', returns void
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade
*/
@ -204,14 +205,14 @@ function _relateentities_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NUL
}
/**
* @return CRM_Relateentities_Upgrader
* @return CRM_RelateEntities_Upgrader
*/
function _relateentities_civix_upgrader() {
if (!file_exists(__DIR__ . '/CRM/Relateentities/Upgrader.php')) {
if (!file_exists(__DIR__ . '/CRM/RelateEntities/Upgrader.php')) {
return NULL;
}
else {
return CRM_Relateentities_Upgrader_Base::instance();
return CRM_RelateEntities_Upgrader_Base::instance();
}
}
@ -253,7 +254,6 @@ function _relateentities_civix_find_files($dir, $pattern) {
}
return $result;
}
/**
* (Delegated) Implements hook_civicrm_managed().
*
@ -467,6 +467,14 @@ function _relateentities_civix_civicrm_alterSettingsFolders(&$metaDataFolders =
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
*/
function _relateentities_civix_civicrm_entityTypes(&$entityTypes) {
$entityTypes = array_merge($entityTypes, []);
$entityTypes = array_merge($entityTypes, array (
'CRM_RelateEntities_DAO_RelateEntities' =>
array (
'name' => 'RelateEntities',
'class' => 'CRM_RelateEntities_DAO_RelateEntities',
'table' => 'civicrm_relate_entities',
),
));
}