$moduleName = Vtiger_Request::getModule(); // Retrieves the current module name echo $moduleName; // Prints the current module name
if(Vtiger_Request::getModule() == 'Contacts') { // Perform actions for the Contacts module require_once 'packages/Contacts/Contact.php'; // Load package library for Contacts }In this example, the `if` statement checks if the current module is 'Contacts'. If true, the script loads the package library for Contacts Module (`packages/Contacts/Contact.php`). The package library contains reusable code and functions specific to the module that can be utilized in the script. The Vtiger_Request::getModule method is part of the Vtiger CRM core library and does not require additional packages to be installed.