Skip to content

Commit

Permalink
doc(Modules) function headers
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed Nov 27, 2021
1 parent 0838baa commit 0326b3e
Show file tree
Hide file tree
Showing 65 changed files with 177 additions and 177 deletions.
78 changes: 39 additions & 39 deletions modules/Accounts/Accounts.php
Expand Up @@ -112,8 +112,8 @@ public function save_module($module) {
}

/** Returns a list of the associated Campaigns
* @param $id -- campaign id :: Type Integer
* @returns list of campaigns in array format
* @param integer campaign id
* @return array list of campaigns in array format
*/
public function get_campaigns($id, $cur_tab_id, $rel_tab_id, $actions = false) {
global $log, $singlepane_view,$currentModule;
Expand Down Expand Up @@ -322,8 +322,8 @@ public function get_emails($id, $cur_tab_id, $rel_tab_id, $actions = false) {

/**
* Function to get Account related Invoices
* @param integer $id - accountid
* returns related Invoices record in array format
* @param integer accountid
* @return array related Invoices record in array format
*/
public function get_invoices($id, $cur_tab_id, $rel_tab_id, $actions = false) {
global $log, $singlepane_view,$currentModule,$current_user;
Expand Down Expand Up @@ -384,8 +384,8 @@ public function get_invoices($id, $cur_tab_id, $rel_tab_id, $actions = false) {

/**
* Function to get Account related Products
* @param integer $id - accountid
* returns related Products record in array format
* @param integer accountid
* @return array related Products record in array format
*/
public function get_products($id, $cur_tab_id, $rel_tab_id, $actions = false) {
global $log, $singlepane_view,$currentModule;
Expand Down Expand Up @@ -445,8 +445,8 @@ public function get_products($id, $cur_tab_id, $rel_tab_id, $actions = false) {
}

/** Function to export the account records in CSV Format
* @param reference variable - where condition is passed when the query is executed
* Returns Export Accounts Query.
* @param string reference variable - where condition is passed when the query is executed
* @return string Export Accounts Query
*/
public function create_export_query($where) {
global $log, $current_user;
Expand Down Expand Up @@ -482,7 +482,7 @@ public function create_export_query($where) {
return $query;
}

/** Function to get the Columnnames of the Account Record
/** Function to get the column names of the Account Record
* Used By vtigerCRM Word Plugin
* Returns the Merge Fields for Word Plugin
*/
Expand Down Expand Up @@ -522,9 +522,9 @@ public function getColumnNames_Acnt() {

/**
* Move the related records of the specified list of id's to the given record.
* @param String This module name
* @param Array List of Entity Id's from which related records need to be transfered
* @param Integer Id of the the Record to which the related records are to be moved
* @param string This module name
* @param array List of Entity Id's from which related records need to be transfered
* @param integer Id of the the Record to which the related records are to be moved
*/
public function transferRelatedRecords($module, $transferEntityIds, $entityId) {
global $adb,$log;
Expand Down Expand Up @@ -581,10 +581,10 @@ public function transferRelatedRecords($module, $transferEntityIds, $entityId) {
$log->debug('< transferRelatedRecords');
}

/*
/**
* Function to get the relation tables for related modules
* @param - $secmodule secondary module name
* returns the array with table names and fieldnames storing relations between module and this module
* @param string secondary module name
* @return array with table names and fieldnames storing relations between module and this module
*/
public function setRelationTables($secmodule) {
$rel_tables = array (
Expand All @@ -601,11 +601,11 @@ public function setRelationTables($secmodule) {
return isset($rel_tables[$secmodule]) ? $rel_tables[$secmodule] : '';
}

/*
/**
* Function to get the secondary query part of a report
* @param - $module primary module name
* @param - $secmodule secondary module name
* returns the query string formed on fetching the related data for report for secondary module
* @param string primary module name
* @param string secondary module name
* @return string query string formed on fetching the related data for report for secondary module
*/
public function generateReportsSecQuery($module, $secmodule, $queryPlanner, $type = '', $where_condition = '') {
$query = parent::generateReportsSecQuery($module, $secmodule, $queryPlanner, $type, $where_condition);
Expand All @@ -626,8 +626,8 @@ public function generateReportsSecQuery($module, $secmodule, $queryPlanner, $typ

/**
* Function to get Account hierarchy of the given Account
* @param integer $id - accountid
* returns Account hierarchy in array format
* @param integer accountid
* @return array Account hierarchy in array format
*/
public function getAccountHierarchy($id) {
global $log, $current_user;
Expand Down Expand Up @@ -692,9 +692,9 @@ public function getAccountHierarchy($id) {

/**
* Function to Recursively get all the upper accounts of a given Account
* @param integer $id - accountid
* @param array $parent_accounts - Array of all the parent accounts
* returns All the parent accounts of the given accountid in array format
* @param integer accountid
* @param array of all the parent accounts
* @return array All the parent accounts of the given accountid in array format
*/
public function __getParentAccounts($id, &$parent_accounts, &$encountered_accounts) {
global $log, $adb;
Expand All @@ -715,17 +715,17 @@ public function __getParentAccounts($id, &$parent_accounts, &$encountered_accoun
}

$query = "SELECT vtiger_account.*, vtiger_accountbillads.*," .
" CASE when (vtiger_users.user_name not like '') THEN vtiger_users.ename ELSE vtiger_groups.groupname END as user_name " .
" FROM vtiger_account" .
" INNER JOIN ".$this->crmentityTableAlias.
" ON vtiger_crmentity.crmid = vtiger_account.accountid" .
" INNER JOIN vtiger_accountbillads" .
" ON vtiger_account.accountid = vtiger_accountbillads.accountaddressid " .
" LEFT JOIN vtiger_groups" .
" ON vtiger_groups.groupid = vtiger_crmentity.smownerid" .
" LEFT JOIN vtiger_users" .
" ON vtiger_users.id = vtiger_crmentity.smownerid" .
" WHERE vtiger_crmentity.deleted = 0 and vtiger_account.accountid = ?";
" CASE when (vtiger_users.user_name not like '') THEN vtiger_users.ename ELSE vtiger_groups.groupname END as user_name " .
" FROM vtiger_account" .
" INNER JOIN ".$this->crmentityTableAlias.
" ON vtiger_crmentity.crmid = vtiger_account.accountid" .
" INNER JOIN vtiger_accountbillads" .
" ON vtiger_account.accountid = vtiger_accountbillads.accountaddressid " .
" LEFT JOIN vtiger_groups" .
" ON vtiger_groups.groupid = vtiger_crmentity.smownerid" .
" LEFT JOIN vtiger_users" .
" ON vtiger_users.id = vtiger_crmentity.smownerid" .
" WHERE vtiger_crmentity.deleted = 0 and vtiger_account.accountid = ?";
$params = array($id);
$res = $adb->pquery($query, $params);

Expand All @@ -750,10 +750,10 @@ public function __getParentAccounts($id, &$parent_accounts, &$encountered_accoun

/**
* Function to Recursively get all the child accounts of a given Account
* @param integer $id - accountid
* @param array $child_accounts - Array of all the child accounts
* @param integer $depth - Depth at which the particular account has to be placed in the hierarchy
* returns All the child accounts of the given accountid in array format
* @param integer accountid
* @param array of all the child accounts
* @param integer Depth at which the particular account has to be placed in the hierarchy
* @return array All the child accounts of the given accountid in array format
*/
public function __getChildAccounts($id, &$child_accounts, $depth) {
global $log, $adb;
Expand Down
4 changes: 2 additions & 2 deletions modules/Assets/Assets.php
Expand Up @@ -138,8 +138,8 @@ public function unlinkDependencies($module, $id) {

/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
* @param string Module name
* @param string Event Type
*/
public function vtlib_handler($moduleName, $eventType) {
require_once 'include/utils/utils.php';
Expand Down
2 changes: 1 addition & 1 deletion modules/Campaigns/Campaigns.php
Expand Up @@ -598,7 +598,7 @@ public static function createPotentialRelatedTo($relatedto, $campaignid) {

/**
* Move the related records of the specified list of id's to the given record.
* @param String This module name
* @param string This module name
* @param Array List of Entity Id's from which related records need to be transfered
* @param Integer Id of the the Record to which the related records are to be moved
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/CobroPago/CobroPago.php
Expand Up @@ -308,8 +308,8 @@ public static function invoice_control_installed() {

/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
* @param string Module name
* @param string Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
public function vtlib_handler($modulename, $event_type) {
if ($event_type == 'module.postinstall') {
Expand Down
4 changes: 2 additions & 2 deletions modules/ConfigEditor/ConfigEditor.php
Expand Up @@ -12,8 +12,8 @@ class ConfigEditor {

/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
* @param string Module name
* @param string Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
public function vtlib_handler($modulename, $event_type) {
}
Expand Down
2 changes: 1 addition & 1 deletion modules/Contacts/Contacts.php
Expand Up @@ -814,7 +814,7 @@ public function preSaveCheck($request) {

/**
* Move the related records of the specified list of id's to the given record.
* @param String This module name
* @param string This module name
* @param Array List of Entity Id's from which related records need to be transfered
* @param Integer Id of the the Record to which the related records are to be moved
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/CronTasks/CronTasks.php
Expand Up @@ -12,8 +12,8 @@ class CronTasks {

/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
* @param string Module name
* @param string Event Type
*/
public function vtlib_handler($moduleName, $eventType) {
require_once 'include/utils/utils.php';
Expand Down
4 changes: 2 additions & 2 deletions modules/CustomerPortal/CustomerPortal.php
Expand Up @@ -14,8 +14,8 @@ class CustomerPortal {

/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
* @param string Module name
* @param string Event Type
*/
public function vtlib_handler($moduleName, $eventType) {
require_once 'include/utils/utils.php';
Expand Down
4 changes: 2 additions & 2 deletions modules/Documents/Documents.php
Expand Up @@ -244,9 +244,9 @@ public function insertIntoAttachment($id, $module, $direct_import = false) {

/**
* Save the related module record information. Triggered from CRMEntity->saveentity method or updateRelations.php
* @param String This module name
* @param string This module name
* @param Integer This module record number
* @param String Related module name
* @param string Related module name
* @param mixed Integer or Array of related module record number
*/
public function save_related_module($module, $crmid, $with_module, $with_crmid) {
Expand Down
4 changes: 2 additions & 2 deletions modules/EtiquetasOO/EtiquetasOO.php
Expand Up @@ -16,8 +16,8 @@ class EtiquetasOO extends CRMEntity {

/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
* @param string Module name
* @param string Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
public function vtlib_handler($modulename, $event_type) {
if ($event_type == 'module.postinstall') {
Expand Down
2 changes: 1 addition & 1 deletion modules/HelpDesk/HelpDesk.php
Expand Up @@ -489,7 +489,7 @@ public static function getUpdateLogEditMessage($ticketid, $column_fields, $assig

/**
* Move the related records of the specified list of id's to the given record.
* @param String This module name
* @param string This module name
* @param Array List of Entity Id's from which related records need to be transfered
* @param Integer Id of the the Record to which the related records are to be moved
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/InventoryDetails/InventoryDetails.php
Expand Up @@ -148,8 +148,8 @@ public function save_module($module) {

/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
* @param string Module name
* @param string Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
public function vtlib_handler($modulename, $event_type) {
if ($event_type == 'module.postinstall') {
Expand Down
2 changes: 1 addition & 1 deletion modules/Leads/Leads.php
Expand Up @@ -309,7 +309,7 @@ public function getColumnNames_Lead() {

/**
* Move the related records of the specified list of id's to the given record.
* @param String This module name
* @param string This module name
* @param Array List of Entity Id's from which related records need to be transfered
* @param Integer Id of the the Record to which the related records are to be moved
*/
Expand Down
6 changes: 3 additions & 3 deletions modules/MailManager/MailManager.php
Expand Up @@ -110,7 +110,7 @@ public static function checkModuleCreateAccessForCurrentUser($module) {
/**
* function to check the read access for the current user
* @global Users Instance $current_user
* @param String $module - Name of the module
* @param string $module - Name of the module
* @return Boolean
*/
public static function checkModuleReadAccessForCurrentUser($module) {
Expand All @@ -119,8 +119,8 @@ public static function checkModuleReadAccessForCurrentUser($module) {

/**
* Invoked when special actions are performed on the module.
* @param String $modulename - Module name
* @param String $event_type - Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
* @param string $modulename - Module name
* @param string $event_type - Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
public function vtlib_handler($modulename, $event_type) {
if ($event_type == 'module.postinstall') {
Expand Down
16 changes: 8 additions & 8 deletions modules/MailManager/src/connectors/Connector.php
Expand Up @@ -204,15 +204,15 @@ public function updateFolder($folder, $options) {

/**
* Returns MailManager_Model_Folder Instance
* @param String $name - folder name
* @param string $name - folder name
*/
public function folderInstance($name) {
return new MailManager_Model_Folder($name);
}

/**
* Sets a list of mails with paging
* @param String $folder - MailManager_Model_Folder Instance
* @param string $folder - MailManager_Model_Folder Instance
* @param Integer $start - Page number
* @param Integer $maxLimit - Number of mails
*/
Expand Down Expand Up @@ -275,7 +275,7 @@ public function clearDBCache() {

/**
* Function which deletes the mails
* @param String $msgno - List of message number seperated by commas.
* @param string $msgno - List of message number seperated by commas.
*/
public function deleteMail($msgno) {
$msgno = trim($msgno, ',');
Expand All @@ -288,8 +288,8 @@ public function deleteMail($msgno) {

/**
* Function which moves mail to another folder
* @param String $msgno - List of message number separated by commas
* @param String $folderName - folder name
* @param string $msgno - List of message number separated by commas
* @param string $folderName - folder name
*/
public function moveMail($msgno, $folderName) {
$msgno = trim($msgno, ',');
Expand All @@ -303,7 +303,7 @@ public function moveMail($msgno, $folderName) {

/**
* Creates an instance of Message
* @param String $msgno - Message number
* @param string $msgno - Message number
* @return MailManager_Model_Message
*/
public function openMail($msgno) {
Expand All @@ -322,7 +322,7 @@ public function markMailUnread($msgno) {

/**
* Marks the mail as Read
* @param String $msgno - Message Number
* @param string $msgno - Message Number
*/
public function markMailRead($msgno) {
imap_setflag_full($this->mBox, $msgno, '\\Seen');
Expand All @@ -331,7 +331,7 @@ public function markMailRead($msgno) {

/**
* Searches the Mail Box with the query
* @param String $query - imap search format
* @param string $query - imap search format
* @param MailManager_Model_Folder $folder - folder instance
* @param Integer $start - Page number
* @param Integer $maxLimit - Number of mails
Expand Down
4 changes: 2 additions & 2 deletions modules/MailManager/src/controllers/Controller.php
Expand Up @@ -40,7 +40,7 @@ public function getViewer() {
/**
* Function which fetches the template file
* @global String $currentModule
* @param String $filename
* @param string $filename
* @return template file
*/
public function getModuleTpl($filename) {
Expand Down Expand Up @@ -88,7 +88,7 @@ protected function hasMailboxModel() {

/**
* Returns a Connector to either MailBox or Internal Drafts
* @param String $folder - Name of the folder
* @param string $folder - Name of the folder
* @return MailManager_Connector
*/
protected function getConnector($folder = '') {
Expand Down

0 comments on commit 0326b3e

Please sign in to comment.