Documentation

Accounts extends CRMEntity
in package

Table of Contents

$column_fields  : mixed
$customFieldTable  : mixed
Mandatory table for supporting custom fields.
$def_basicsearch_col  : mixed
$default_order_by  : mixed
$default_sort_order  : mixed
$emailTemplate_defaultFields  : mixed
$entity_table  : mixed
$list_fields_name  : mixed
$mandatory_fields  : mixed
$relationFields  : array<string|int, string>
$search_fields  : mixed
$search_fields_name  : mixed
$tab_name  : mixed
$tab_name_index  : mixed
$table_index  : mixed
$table_name  : mixed
__getChildAccounts()  : mixed
Function to Recursively get all the child accounts of a given Account.
__getParentAccounts()  : mixed
Function to Recursively get all the upper accounts of a given Account.
getAccountHierarchy()  : mixed
Function to get Account hierarchy of the given Account.
getHierarchyData()  : mixed
Function to create array of all the accounts in the hierarchy.
setRelationTables()  : array<string|int, mixed>
Function to get the relation tables for related modules.

Properties

$column_fields

public mixed $column_fields = []

$customFieldTable

Mandatory table for supporting custom fields.

public mixed $customFieldTable = ['vtiger_accountscf', 'accountid']

$def_basicsearch_col

public mixed $def_basicsearch_col = 'accountname'

$default_order_by

public mixed $default_order_by = ''

$default_sort_order

public mixed $default_sort_order = 'ASC'

$emailTemplate_defaultFields

public mixed $emailTemplate_defaultFields = ['accountname', 'account_type', 'industry', 'annualrevenue', 'phone', 'email1', 'rating', 'website', 'fax']

$entity_table

public mixed $entity_table = 'vtiger_crmentity'

$list_fields_name

public mixed $list_fields_name = ['Account Name' => 'accountname', 'Assigned To' => 'assigned_user_id', 'FL_STATUS' => 'accounts_status', 'Type' => 'accounttype', 'Vat ID' => 'vat_id']

$mandatory_fields

public mixed $mandatory_fields = ['assigned_user_id', 'createdtime', 'modifiedtime', 'accountname']

$relationFields

public array<string|int, string> $relationFields = []

List of fields in the RelationListView

$search_fields

public mixed $search_fields = ['Account Name' => ['vtiger_account' => 'accountname'], 'Assigned To' => ['vtiger_crmentity' => 'smownerid'], 'FL_STATUS' => ['vtiger_account' => 'accounts_status'], 'Type' => ['vtiger_account' => 'accounttype'], 'Vat ID' => ['vtiger_account' => 'vat_id']]

$search_fields_name

public mixed $search_fields_name = []

$tab_name

public mixed $tab_name = ['vtiger_crmentity', 'vtiger_account', 'vtiger_accountaddress', 'vtiger_accountscf', 'vtiger_entity_stats']

$tab_name_index

public mixed $tab_name_index = ['vtiger_crmentity' => 'crmid', 'vtiger_account' => 'accountid', 'vtiger_accountaddress' => 'accountaddressid', 'vtiger_accountscf' => 'accountid', 'vtiger_entity_stats' => 'crmid']

$table_index

public mixed $table_index = 'accountid'

$table_name

public mixed $table_name = 'vtiger_account'

Methods

__getChildAccounts()

Function to Recursively get all the child accounts of a given Account.

public __getChildAccounts(int $id, array<string|int, mixed> &$childAccounts, mixed $depthBase) : mixed
Parameters
$id : int
  • accountid
$childAccounts : array<string|int, mixed>
  • Array of all the child accounts
$depthBase : mixed
Return values
mixed

__getParentAccounts()

Function to Recursively get all the upper accounts of a given Account.

public __getParentAccounts(int $id, array<string|int, mixed> &$parentAccounts, mixed &$encounteredAccounts, mixed $depthBase) : mixed
Parameters
$id : int
  • accountid
$parentAccounts : array<string|int, mixed>
  • Array of all the parent accounts returns All the parent accounts of the given accountid in array format
$encounteredAccounts : mixed
$depthBase : mixed
Return values
mixed

getAccountHierarchy()

Function to get Account hierarchy of the given Account.

public getAccountHierarchy(int $id[, mixed $listColumns = false ]) : mixed
Parameters
$id : int
  • accountid returns Account hierarchy in array format
$listColumns : mixed = false
Return values
mixed

getHierarchyData()

Function to create array of all the accounts in the hierarchy.

public getHierarchyData(int $id, array<string|int, mixed> $accountInfoBase, int $accountId, array<string|int, mixed> &$listViewEntries) : mixed
Parameters
$id : int
  • Id of the record highest in hierarchy
$accountInfoBase : array<string|int, mixed>
$accountId : int
  • accountid
$listViewEntries : array<string|int, mixed>

returns All the parent accounts of the given accountid in array format

Return values
mixed

setRelationTables()

Function to get the relation tables for related modules.

public setRelationTables([bool|string $secModule = false ]) : array<string|int, mixed>
Parameters
$secModule : bool|string = false

secondary module name

Return values
array<string|int, mixed>

with table names and fieldnames storing relations between module and this module


        

Search results