ModuleBasic
in package
Provides API to work with vtiger CRM Module.
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'
- $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.
- __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.
- allowSharing() : mixed
- Allow module sharing control.
- 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.
- 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.
- getFields() : mixed
- Get all the fields of the module or block.
- getId() : int
- Function to get the Module/Tab id.
- 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.
- save() : mixed
- Save this instance.
- setDefaultSharing() : mixed
- Configure default sharing access for the module.
- setEntityIdentifier() : mixed
- Set entity identifier field for this module.
- unsetAllRelatedList() : mixed
- Unset related list information that exists with other module.
- unsetEntityIdentifier() : mixed
- Unset entity identifier information.
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
$basetable
public
mixed
$basetable
= false
$basetableid
public
mixed
$basetableid
= false
$customized
public
mixed
$customized
= 1
$customtable
public
mixed
$customtable
= false
$entityidcolumn
public
mixed
$entityidcolumn
= false
$entityidfield
public
mixed
$entityidfield
= false
$grouptable
public
mixed
$grouptable
= false
$id
ID of this instance
public
mixed
$id
= false
$isentitytype
public
mixed
$isentitytype
= true
$label
public
mixed
$label
= false
$maxversion
public
mixed
$maxversion
= false
$minversion
public
mixed
$minversion
= false
$name
public
mixed
$name
= false
$ownedby
public
mixed
$ownedby
= 0
$parent
public
mixed
$parent
= false
$premium
public
mixed
$premium
= 0
$presence
public
mixed
$presence
= 0
$tableName
public
mixed
$tableName
$tabsequence
public
mixed
$tabsequence
= false
$type
public
mixed
$type
= 0
$version
public
mixed
$version
= 0
Methods
__create()
Create this module instance.
public
__create() : mixed
Return values
mixed —__delete()
Delete this instance.
public
__delete() : mixed
Return values
mixed —__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 —allowSharing()
Allow module sharing control.
public
allowSharing() : mixed
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 —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 —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 —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 —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 —unsetAllRelatedList()
Unset related list information that exists with other module.
public
unsetAllRelatedList() : mixed
Return values
mixed —unsetEntityIdentifier()
Unset entity identifier information.
public
unsetEntityIdentifier() : mixed