Documentation

Module extends ModuleBasic
in package

Provides API to work with vtiger CRM Modules.

Table of Contents

EVENT_MODULE_DISABLED  = 'module.disabled'
EVENT_MODULE_ENABLED  = 'module.enabled'
EVENT_MODULE_POSTINSTALL  = 'module.postinstall'
EVENT_MODULE_POSTUPDATE  = 'module.postupdate'
EVENT_MODULE_PREUNINSTALL  = 'module.preuninstall'
EVENT_MODULE_PREUPDATE  = 'module.preupdate'
$allowExport  : bool
Allow export.
$basetable  : mixed
$basetableid  : mixed
$customized  : mixed
$customtable  : mixed
$entityidcolumn  : mixed
$entityidfield  : mixed
$grouptable  : mixed
$id  : mixed
ID of this instance
$isentitytype  : mixed
$label  : mixed
$maxversion  : mixed
$minversion  : mixed
$name  : mixed
$ownedby  : mixed
$parent  : mixed
$premium  : mixed
$presence  : mixed
$tableName  : mixed
$tabsequence  : mixed
$type  : mixed
$version  : mixed
__create()  : mixed
Create this module instance.
__delete()  : mixed
Delete this instance.
__getNextRelatedListSequence()  : int
Get related list sequence to use.
__update()  : mixed
Update this instance.
__updateVersion()  : mixed
Update module version information.
addBlock()  : $this
Add block to this module.
addFilter()  : $this
Add filter to this module.
addLink()  : mixed
Add custom link for a module page.
allowSharing()  : mixed
Allow module sharing control.
createFiles()  : mixed
delete()  : mixed
Delete this instance.
deleteCRMEntityRel()  : mixed
Function to remove rows in vtiger_crmentityrel.
deleteDir()  : mixed
Function to remove files related to a module.
deleteFromCRMEntity()  : mixed
Function to remove rows in vtiger_crmentity, vtiger_crmentityrel.
deleteFromModentityNum()  : mixed
Function to remove row in vtiger_modentity_num table.
deleteGroup2Modules()  : mixed
Function to remove rows in vtiger_group2modules table.
deleteIcons()  : mixed
Function to remove icons related to a module.
deleteLink()  : mixed
Delete custom link of a module.
deleteModuleTables()  : mixed
Function to remove tables created by a module.
disableTools()  : mixed
Disable tools for this module.
disallowSharing()  : mixed
Disallow module sharing control.
enableTools()  : mixed
Enable tools for this module.
fireEvent()  : mixed
Fire the event for the module (if moduleHandler is defined).
getClassInstance()  : mixed
Get instance of the module class.
getFields()  : mixed
Get all the fields of the module or block.
getId()  : int
Function to get the Module/Tab id.
getInstance()  : self
Get instance by id or name.
getLinks()  : mixed
Get all the custom links related to this module.
getLinksForExport()  : mixed
Get all the custom links related to this module for exporting.
initialize()  : mixed
Initialize this instance.
initTables()  : mixed
Initialize table required for the module.
initWebservice()  : mixed
Initialize webservice setup for this module instance.
isCustomizable()  : bool
Check if this module is customized.
isExportable()  : bool
Check if this module is exportable.
isModuleUpgradable()  : bool
Check if this module is upgradable.
save()  : mixed
Save this instance.
setDefaultSharing()  : mixed
Configure default sharing access for the module.
setEntityIdentifier()  : mixed
Set entity identifier field for this module.
setRelatedList()  : mixed
Set related list information between other module.
toggleModuleAccess()  : mixed
Toggle the module (enable/disable).
unsetAllRelatedList()  : mixed
Unset related list information that exists with other module.
unsetEntityIdentifier()  : mixed
Unset entity identifier information.
unsetRelatedList()  : mixed
Unset related list information that exists with other module.

Constants

EVENT_MODULE_DISABLED

public mixed EVENT_MODULE_DISABLED = 'module.disabled'

EVENT_MODULE_ENABLED

public mixed EVENT_MODULE_ENABLED = 'module.enabled'

EVENT_MODULE_POSTINSTALL

public mixed EVENT_MODULE_POSTINSTALL = 'module.postinstall'

EVENT_MODULE_POSTUPDATE

public mixed EVENT_MODULE_POSTUPDATE = 'module.postupdate'

EVENT_MODULE_PREUNINSTALL

public mixed EVENT_MODULE_PREUNINSTALL = 'module.preuninstall'

EVENT_MODULE_PREUPDATE

public mixed EVENT_MODULE_PREUPDATE = 'module.preupdate'

Properties

$allowExport

Allow export.

public bool $allowExport = false

$entityidcolumn

public mixed $entityidcolumn = false

Methods

__create()

Create this module instance.

public __create() : mixed
Return values
mixed

__delete()

Delete this instance.

public __delete() : mixed
Return values
mixed

__getNextRelatedListSequence()

Get related list sequence to use.

public __getNextRelatedListSequence() : int
Return values
int

__update()

Update this instance.

public __update() : mixed
Return values
mixed

__updateVersion()

Update module version information.

public __updateVersion(string $newVersion) : mixed
Parameters
$newVersion : string
Return values
mixed

addBlock()

Add block to this module.

public addBlock(Block $blockInstance) : $this
Parameters
$blockInstance : Block
Return values
$this

addFilter()

Add filter to this module.

public addFilter(Filter $filterInstance) : $this
Parameters
$filterInstance : Filter
Return values
$this

Add custom link for a module page.

public addLink(mixed $type, mixed $label, mixed $url[, mixed $iconpath = '' ], mixed $sequence[, mixed|null $handlerInfo = null ]) : mixed
Parameters
$type : mixed
$label : mixed
$url : mixed
$iconpath : mixed = ''
$sequence : mixed
$handlerInfo : mixed|null = null
Return values
mixed

allowSharing()

Allow module sharing control.

public allowSharing() : mixed
Return values
mixed

createFiles()

public createFiles(Field $entityField) : mixed
Parameters
$entityField : Field
Return values
mixed

delete()

Delete this instance.

public delete() : mixed
Return values
mixed

deleteCRMEntityRel()

Function to remove rows in vtiger_crmentityrel.

public deleteCRMEntityRel() : mixed
Return values
mixed

deleteDir()

Function to remove files related to a module.

public deleteDir(ModuleBasic $moduleInstance) : mixed
Parameters
$moduleInstance : ModuleBasic
Return values
mixed

deleteFromCRMEntity()

Function to remove rows in vtiger_crmentity, vtiger_crmentityrel.

public deleteFromCRMEntity() : mixed
Return values
mixed

deleteFromModentityNum()

Function to remove row in vtiger_modentity_num table.

public deleteFromModentityNum() : mixed
Return values
mixed

deleteGroup2Modules()

Function to remove rows in vtiger_group2modules table.

public deleteGroup2Modules() : mixed
Return values
mixed

deleteIcons()

Function to remove icons related to a module.

public deleteIcons() : mixed
Return values
mixed

Delete custom link of a module.

public deleteLink(mixed $type, mixed $label[, mixed $url = false ]) : mixed
Parameters
$type : mixed
$label : mixed
$url : mixed = false
Return values
mixed

deleteModuleTables()

Function to remove tables created by a module.

public deleteModuleTables() : mixed
Return values
mixed

disableTools()

Disable tools for this module.

public disableTools(string|array<string|int, mixed> $tools) : mixed
Parameters
$tools : string|array<string|int, mixed>
  • String or Array with value ['Import', 'Export']
Return values
mixed

disallowSharing()

Disallow module sharing control.

public disallowSharing() : mixed
Return values
mixed

enableTools()

Enable tools for this module.

public enableTools(string|array<string|int, mixed> $tools) : mixed
Parameters
$tools : string|array<string|int, mixed>

String or Array with value ['Import', 'Export']

Return values
mixed

fireEvent()

Fire the event for the module (if moduleHandler is defined).

public static fireEvent(mixed $modulename, mixed $eventType) : mixed
Parameters
$modulename : mixed
$eventType : mixed
Return values
mixed

getClassInstance()

Get instance of the module class.

public static getClassInstance(mixed $modulename) : mixed
Parameters
$modulename : mixed
Return values
mixed

getFields()

Get all the fields of the module or block.

public getFields([Block $blockInstance = false ]) : mixed
Parameters
$blockInstance : Block = false
  • Instance of block to use to get fields, false to get all the block fields
Return values
mixed

getId()

Function to get the Module/Tab id.

public getId() : int
Return values
int

getInstance()

Get instance by id or name.

public static getInstance(mixed $value) : self
Parameters
$value : mixed
Return values
self

Get all the custom links related to this module.

public getLinks() : mixed
Return values
mixed

getLinksForExport()

Get all the custom links related to this module for exporting.

public getLinksForExport() : mixed
Return values
mixed

initialize()

Initialize this instance.

public initialize(mixed $valuemap) : mixed
Parameters
$valuemap : mixed
Return values
mixed

initTables()

Initialize table required for the module.

public initTables([string $basetable = false ][, string $basetableid = false ]) : mixed

Creates basetable, customtable, grouptable
customtable name is basetable + 'cf'
grouptable name is basetable + 'grouprel'
.

Parameters
$basetable : string = false

Base table name (default modulename in lowercase)

$basetableid : string = false

Base table column (default modulenameid in lowercase)

Return values
mixed

initWebservice()

Initialize webservice setup for this module instance.

public initWebservice() : mixed
Return values
mixed

isCustomizable()

Check if this module is customized.

public isCustomizable() : bool
Return values
bool

isExportable()

Check if this module is exportable.

public isExportable() : bool
Return values
bool

isModuleUpgradable()

Check if this module is upgradable.

public isModuleUpgradable() : bool
Return values
bool

save()

Save this instance.

public save() : mixed
Return values
mixed

setDefaultSharing()

Configure default sharing access for the module.

public setDefaultSharing([string $permission_text = 'Public_ReadWriteDelete' ]) : mixed
Parameters
$permission_text : string = 'Public_ReadWriteDelete'

Permission text should be one of ['Public_ReadWriteDelete', 'Public_ReadOnly', 'Public_ReadWrite', 'Private']

Return values
mixed

setEntityIdentifier()

Set entity identifier field for this module.

public setEntityIdentifier(FieldBasic $fieldInstance) : mixed
Parameters
$fieldInstance : FieldBasic
Return values
mixed

setRelatedList()

Set related list information between other module.

public setRelatedList(mixed $moduleInstance[, mixed $label = '' ][, mixed $actions = false ][, mixed $functionName = 'getRelatedList' ][, mixed $fieldName = null ][, mixed $fields = [] ]) : mixed
Parameters
$moduleInstance : mixed
$label : mixed = ''
$actions : mixed = false
$functionName : mixed = 'getRelatedList'
$fieldName : mixed = null
$fields : mixed = []
Return values
mixed

toggleModuleAccess()

Toggle the module (enable/disable).

public static toggleModuleAccess(mixed $moduleName, mixed $enableDisable) : mixed
Parameters
$moduleName : mixed
$enableDisable : mixed
Return values
mixed

unsetAllRelatedList()

Unset related list information that exists with other module.

public unsetAllRelatedList() : mixed
Return values
mixed

unsetEntityIdentifier()

Unset entity identifier information.

public unsetEntityIdentifier() : mixed
Return values
mixed

unsetRelatedList()

Unset related list information that exists with other module.

public unsetRelatedList(mixed $moduleInstance[, mixed $label = '' ][, mixed $function_name = 'getRelatedList' ]) : mixed
Parameters
$moduleInstance : mixed
$label : mixed = ''
$function_name : mixed = 'getRelatedList'
Return values
mixed

        

Search results