Modules
Overview
How modules are defined and used within the system
Module Definitions
The module definitions, defined in ./include/modules.php
, determine how modules are displayed and used throughout the application. Any custom metadata, whether from a plugin or a custom module, should be loaded through the Include extension. Prior to 6.3.x, module definitions could be added by creating the file ./include/modules_override.php
. This method of creating module definitions is still compatible but is not recommended from a best practices standpoint.
Hierarchy Diagram
The modules metadata are loaded in the following manner:
$moduleList
The $moduleList
is an array containing a list of modules in the system. The format of the array is to have a numeric index and a value of the modules unique key.
$moduleList[] = 'Accounts';
$beanList
The $beanList
variable is an array that stores a list of all active beans (modules) in the application. The format of the array is array('<bean plural name>' => '<bean singular name>');
. The $beanList
key is used to lookup values in the $beanFiles
variable.
$beanList['Accounts'] = 'Account';
$beanFiles
The $beanFiles
variable is an array used to reference the class files for a bean. The format of the array is array('<bean singular name>' => '<relative class file>');
. The bean name, stored in singular form, is a reference to the class name of the object, which is looked up from the $beanList 'key'.
$beanFiles['Account'] = 'modules/Accounts/Account.php';
$modInvisList
The $modInvisList
variable removes a module from the navigation tab in the MegaMenu, reporting, and it's subpanels under related modules.To enable a hidden module for reporting, you can use $report_include_modules
. To enable a hidden modules subpanels on related modules, you can use $modules_exempt_from_availability_check
. The
$modInvisList[] = 'Prospects';
$modules_exempt_from_availability_check
The $modules_exempt_from_availability_check
variable is used in conjunction with $modInvisList
. When a module has been removed from the MegaMenu view with $modInvisList
, this will allow for the display of the modules subpanels under related modules.
$modules_exempt_from_availability_check['OAuthKeys'] = 'OAuthKeys';
$report_include_modules
The $report_include_modules
variable is used in conjunction with $modInvisList
. When a module has been hidden with $modInvisList
, this will allow for the module to be enabled for reporting.
$report_include_modules['Prospects'] = 'Prospect';
$adminOnlyList
The $adminOnlyList
variable is an extra level of security for modules that are can be accessed only by administrators through the Admin page. Specifying all
will restrict all actions to be admin only.
$adminOnlyList['PdfManager'] = array(
'all' => 1
);
$bwcModules
The $bwcModules
variable determines which modules are in backward compatibility mode. More information on backward compatibility can be found in the Backward Compatibility section.