Added more changes

This commit is contained in:
2018-08-14 03:29:23 +05:30
parent 8bfc1afd21
commit 499efd7087
4 changed files with 143 additions and 14 deletions

View File

@ -103,8 +103,9 @@ function entitytemplates_civicrm_managed(&$entities) {
],
];
foreach ([
'Contact' => 'CRM_Contact_Form_Contact',
'Contribution' => 'CRM_Contribute_Form_Contribution',
'Individual' => ['CRM_Contact_Form_Contact', 'civicrm/contact/add?reset=1&ct=Individual'],
'Organization' => ['CRM_Contact_Form_Contact', 'civicrm/contact/add?reset=1&ct=Organization'],
'Contribution' => ['CRM_Contribute_Form_Contribution', 'civicrm/contribute/add?reset=1&action=add&context=standalone'],
] as $entityType => $formClassName) {
$entities[] = [
'module' => 'com.megaphonetech.entitytemplates',
@ -112,10 +113,11 @@ function entitytemplates_civicrm_managed(&$entities) {
'entity' => 'OptionValue',
'params' => [
'version' => 3,
'option_group_id' => $ApprovalStatusOptionGroup,
'option_group_id' => 'entity_template_for',
'label' => ts("{$entityType}"),
'value' => $formClassName,
'name' => $entityType,
'value' => $entityType,
'name' => $formClassName[1],
'description' => $formClassName[0],
'is_default' => '0',
'weight' => '1',
'is_optgroup' => '0',
@ -171,7 +173,7 @@ function entitytemplates_civicrm_alterSettingsFolders(&$metaDataFolders = NULL)
*/
function entitytemplates_civicrm_entityTypes(&$entityTypes) {
_entitytemplates_civix_civicrm_entityTypes($entityTypes);
$entityTypes = [
$entityTypes[] = [
'name' => 'EntityTemplates',
'class' => 'CRM_Core_DAO_EntityTemplates',
'table' => 'civicrm_entity_templates',
@ -185,7 +187,7 @@ function entitytemplates_civicrm_entityTypes(&$entityTypes) {
*
*/
function entitytemplates_civicrm_navigationMenu(&$menu) {
_entitytemplates_civix_insert_navigation_menu($menu, 'Administer/CiviGrant', [
_entitytemplates_civix_insert_navigation_menu($menu, 'Administer/Customize Data and Screens', [
'label' => ts('Entity Templates', ['domain' => 'com.megaphonetech.entitytemplates']),
'name' => 'entity_templates',
'url' => CRM_Utils_System::url('civicrm/entity/templates', 'reset=1&action=browse', TRUE),