Contacts
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
- $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 : array<string|int, mixed>
- $table_index : mixed
- $table_name : mixed
- $tableJoinClause : array<string|int, string>
- __construct() : mixed
- Constructor which will set the column_fields in this object.
- getChild() : array<string|int, mixed>
- Function to Recursively get all the child.
- getHierarchy() : array<string|int, mixed>
- Function to get contacts hierarchy.
- getHierarchyData() : array<string|int, mixed>
- Function to create array of all the contacts in the hierarchy.
- getInstance() : self
- Get CRMEntity instance.
- getJoinClause() : string
- Get table join clause by table name.
- getLockFields() : array<string|int, mixed>
- Gets fields to locking record.
- getParent() : array<string|int, mixed>
- Function to Recursively get all the parent.
- moduleHandler() : mixed
- Invoked when special actions are performed on the module.
- retrieveEntityInfo() : mixed
- Retrieve record information of the module.
- setRelationTables() : array<string|int, mixed>
- Function to get the relation tables for related modules.
- trackLinkedInfo() : mixed
- Function to track when a new record is linked to a given record.
- trackUnLinkedInfo() : mixed
- Function to track when a record is unlinked to a given record.
- createColumnAliasForField() : string
- Function returns the column alias for a field.
- init() : void
- Loading the system configuration.
Properties
$column_fields
public
mixed
$column_fields
= []
$customFieldTable
Mandatory table for supporting custom fields.
public
mixed
$customFieldTable
= ['vtiger_contactscf', 'contactid']
$def_basicsearch_col
public
mixed
$def_basicsearch_col
= 'lastname'
$default_order_by
public
mixed
$default_order_by
= ''
$default_sort_order
public
mixed
$default_sort_order
= 'ASC'
$emailTemplate_defaultFields
public
mixed
$emailTemplate_defaultFields
= ['firstname', 'lastname', 'title', 'email', 'department', 'phone', 'mobile']
$list_fields_name
public
mixed
$list_fields_name
= ['First Name' => 'firstname', 'Last Name' => 'lastname', 'Member Of' => 'parent_id', 'Email' => 'email', 'Office Phone' => 'phone', 'Assigned To' => 'assigned_user_id']
$mandatory_fields
public
mixed
$mandatory_fields
= ['assigned_user_id', 'lastname', 'createdtime', 'modifiedtime']
$relationFields
public
array<string|int, string>
$relationFields
= []
List of fields in the RelationListView
$search_fields
public
mixed
$search_fields
= ['First Name' => ['contactdetails' => 'firstname'], 'Last Name' => ['contactdetails' => 'lastname'], 'Member Of' => ['contactdetails' => 'parent_id'], 'Assigned To' => ['crmentity' => 'smownerid']]
$search_fields_name
public
mixed
$search_fields_name
= []
$tab_name
public
mixed
$tab_name
= ['vtiger_crmentity', 'vtiger_contactdetails', 'vtiger_contactaddress', 'vtiger_contactsubdetails', 'vtiger_contactscf', 'vtiger_customerdetails', 'vtiger_entity_stats']
$tab_name_index
public
array<string|int, mixed>
$tab_name_index
= ['vtiger_crmentity' => 'crmid', 'vtiger_contactdetails' => 'contactid', 'vtiger_contactaddress' => 'contactaddressid', 'vtiger_contactsubdetails' => 'contactsubscriptionid', 'vtiger_contactscf' => 'contactid', 'vtiger_customerdetails' => 'customerid', 'vtiger_entity_stats' => 'crmid']
$table_index
public
mixed
$table_index
= 'contactid'
$table_name
public
mixed
$table_name
= 'vtiger_contactdetails'
$tableJoinClause
public
array<string|int, string>
$tableJoinClause
= ['vtiger_entity_stats' => 'LEFT JOIN', 'u_yf_openstreetmap' => 'LEFT JOIN', 'u_yf_wapro_records_map' => 'LEFT JOIN']
Tables join clause.
Methods
__construct()
Constructor which will set the column_fields in this object.
public
__construct() : mixed
Return values
mixed —getChild()
Function to Recursively get all the child.
public
getChild(int $id, array<string|int, mixed> &$childRow, int $depthBase) : array<string|int, mixed>
Parameters
- $id : int
- $childRow : array<string|int, mixed>
- $depthBase : int
Return values
array<string|int, mixed> —getHierarchy()
Function to get contacts hierarchy.
public
getHierarchy(int $id[, bool $getRawData = false ][, bool $getLinks = true ]) : array<string|int, mixed>
Parameters
- $id : int
- $getRawData : bool = false
- $getLinks : bool = true
Return values
array<string|int, mixed> —getHierarchyData()
Function to create array of all the contacts in the hierarchy.
public
getHierarchyData(int $id, array<string|int, mixed> $baseInfo, int $recordId, array<string|int, mixed> &$listviewEntries[, bool $getRawData = false ][, bool $getLinks = true ]) : array<string|int, mixed>
Parameters
- $id : int
- $baseInfo : array<string|int, mixed>
- $recordId : int
-
- id
- $listviewEntries : array<string|int, mixed>
- $getRawData : bool = false
- $getLinks : bool = true
Return values
array<string|int, mixed> —getInstance()
Get CRMEntity instance.
public
static getInstance(string $module) : self
Parameters
- $module : string
Return values
self —getJoinClause()
Get table join clause by table name.
public
getJoinClause(string $tableName) : string
Parameters
- $tableName : string
Return values
string —getLockFields()
Gets fields to locking record.
public
getLockFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —getParent()
Function to Recursively get all the parent.
public
getParent(int $id, array<string|int, mixed> &$parent, array<string|int, mixed> &$encountered, int $depthBase) : array<string|int, mixed>
Parameters
- $id : int
- $parent : array<string|int, mixed>
- $encountered : array<string|int, mixed>
- $depthBase : int
Return values
array<string|int, mixed> —moduleHandler()
Invoked when special actions are performed on the module.
public
moduleHandler(string $moduleName, string $eventType) : mixed
Parameters
- $moduleName : string
-
Module name
- $eventType : string
-
Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
Return values
mixed —retrieveEntityInfo()
Retrieve record information of the module.
public
retrieveEntityInfo(int $record, string $module) : mixed
Parameters
- $record : int
-
- crmid of record
- $module : string
-
- module name
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
trackLinkedInfo()
Function to track when a new record is linked to a given record.
public
static trackLinkedInfo(mixed $crmId) : mixed
Parameters
- $crmId : mixed
Return values
mixed —trackUnLinkedInfo()
Function to track when a record is unlinked to a given record.
public
trackUnLinkedInfo(int $crmId) : mixed
Parameters
- $crmId : int
Return values
mixed —createColumnAliasForField()
Function returns the column alias for a field.
protected
createColumnAliasForField(array<string|int, mixed> $fieldInfo) : string
Parameters
- $fieldInfo : array<string|int, mixed>
-
- field information
Return values
string —field value
init()
Loading the system configuration.
protected
init() : void