Documentation

PackageImport extends PackageExport
in package

Provides API to import module into vtiger CRM.

Table of Contents

$_errorText  : mixed
$_export_modulexml_file  : mixed
$_export_modulexml_filename  : mixed
$_export_tmpdir  : mixed
$_licensetext  : mixed
License of the package.
$_modulefields_cache  : mixed
Module Fields mapped by [modulename][fieldname] which will be used to create customviews.
$_modulexml  : mixed
Module Meta XML File (Parsed).
$packageType  : mixed
$parameters  : mixed
$moduleInstance  : mixed
$openNode  : mixed
$zipFileName  : mixed
__AddModuleFieldToCache()  : mixed
Cache the field instance for re-use.
__cleanupExport()  : mixed
Clean up the temporary files created.
__construct()  : mixed
Constructor.
__copyLanguageFiles()  : mixed
Function copies language files to zip.
__finishExport()  : mixed
Post export work.
__getManifestFilePath()  : mixed
Set the module.xml file path for this export and return its temporary path.
__GetModuleFieldFromCache()  : mixed
Get field instance from cache.
__initExport()  : mixed
Initialize Export.
__parseManifestFile()  : mixed
Parse the manifest file.
__write()  : mixed
checkZip()  : mixed
Check if zipfile is a valid package.
closeNode()  : mixed
export()  : mixed
Export Module as a zip file.
exportActions()  : mixed
Export actions.
exportBlocks()  : mixed
Export module blocks with its related fields.
exportCronTasks()  : mixed
Export cron tasks for the module.
exportCustomLinks()  : mixed
Export custom links of the module.
exportCustomViews()  : mixed
Export Custom views of the module.
exportDependencies()  : mixed
Export vtiger dependencies.
exportFields()  : mixed
Export fields related to a module block.
exportInventory()  : mixed
Export module inventory fields.
exportModule()  : mixed
Export Module Handler.
exportRelatedLists()  : mixed
Export related lists associated with module.
exportSharingAccess()  : mixed
Export Sharing Access of the module.
exportTables()  : mixed
Export module base and related tables.
getAuthorEmail()  : mixed
Get package author phone email.
getAuthorName()  : mixed
Get package author name.
getAuthorPhone()  : mixed
Get package author phone number.
getAvailableModuleInfoFromModuleBundle()  : array<string|int, mixed>
getDependentMaxVtigerVersion()  : mixed
Get dependent Maximum version.
getDependentVtigerVersion()  : string
Get dependent version.
getDescription()  : mixed
Get package author phone email.
getLicense()  : mixed
Get the license of this package NOTE: checkzip should have been called earlier.
getModuleName()  : string
returns the name of the module.
getModuleNameFromZip()  : mixed
Get module name packaged in the zip file.
getParameters()  : mixed
getPremium()  : int
Get premium.
getTemporaryFilePath()  : mixed
getTypeName()  : mixed
Get type of package (as specified in manifest).
getUpdateInfo()  : mixed
getVersion()  : mixed
Get package version.
getZipFileName()  : string
Get last name of zip file.
import()  : mixed
Import Module from zip file.
importAction()  : mixed
Import action of the module.
importActions()  : mixed
Import actions of the module.
importBlock()  : mixed
Import Block of the module.
importBlocks()  : mixed
Import Blocks of the module.
importCronTasks()  : mixed
Import cron jobs of the module.
importCustomLinks()  : mixed
Import custom links of the module.
importCustomView()  : mixed
Import Custom View of the module.
importCustomViews()  : mixed
Import Custom views of the module.
importEvents()  : mixed
Import Events of the module.
importField()  : mixed
Import Field of the module.
importFields()  : mixed
Import Fields of the module.
importFont()  : mixed
Import font package.
importInRelatedlist()  : mixed
importInventory()  : mixed
Import inventory fields of the module.
importModule()  : mixed
Import Module.
importRelatedlist()  : mixed
Import related list of the module.
importRelatedLists()  : mixed
Import related lists of the module.
importSharingAccess()  : mixed
Import Sharing Access of the module.
importTables()  : mixed
Import Tables of the module.
importUpdate()  : mixed
initImport()  : mixed
Initialize Import.
initParameters()  : mixed
isExtensionType()  : mixed
Are we trying to import extension package?
isFontType()  : bool
Checks font package type.
isLanguageType()  : mixed
Are we trying to import language package?
isLayoutType()  : mixed
Are we trying to import language package?
isModuleBundle()  : bool
checks whether a package is module bundle or not.
isUpdateType()  : mixed
openNode()  : mixed
Output Handlers
outputNode()  : mixed
type()  : false|string
Get type of package (as specified in manifest).
xpath()  : mixed
XPath evaluation on the root module node.

Properties

$_export_modulexml_file

public mixed $_export_modulexml_file

$_export_modulexml_filename

public mixed $_export_modulexml_filename

$_export_tmpdir

public mixed $_export_tmpdir = 'cache/vtlib'

$_licensetext

License of the package.

public mixed $_licensetext = false

$_modulefields_cache

Module Fields mapped by [modulename][fieldname] which will be used to create customviews.

public mixed $_modulefields_cache = []

$_modulexml

Module Meta XML File (Parsed).

public mixed $_modulexml

Methods

__AddModuleFieldToCache()

Cache the field instance for re-use.

public __AddModuleFieldToCache(mixed $moduleInstance, mixed $fieldname, mixed $fieldInstance) : mixed
Parameters
$moduleInstance : mixed
$fieldname : mixed
$fieldInstance : mixed
Return values
mixed

__cleanupExport()

Clean up the temporary files created.

public __cleanupExport() : mixed
Return values
mixed

__construct()

Constructor.

public __construct() : mixed
Return values
mixed

__copyLanguageFiles()

Function copies language files to zip.

public __copyLanguageFiles(Zip $zip, string $module) : mixed
Parameters
$zip : Zip
$module : string
Return values
mixed

__finishExport()

Post export work.

public __finishExport() : mixed
Return values
mixed

__getManifestFilePath()

Set the module.xml file path for this export and return its temporary path.

public __getManifestFilePath() : mixed
Return values
mixed

__GetModuleFieldFromCache()

Get field instance from cache.

public __GetModuleFieldFromCache(mixed $moduleInstance, mixed $fieldname) : mixed
Parameters
$moduleInstance : mixed
$fieldname : mixed
Return values
mixed

__initExport()

Initialize Export.

public __initExport(mixed $module) : mixed
Parameters
$module : mixed
Return values
mixed

__parseManifestFile()

Parse the manifest file.

public __parseManifestFile(Zip $zip) : mixed
Parameters
$zip : Zip
Return values
mixed

__write()

public __write(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

checkZip()

Check if zipfile is a valid package.

public checkZip(mixed $zipfile) : mixed
Parameters
$zipfile : mixed
Return values
mixed

closeNode()

public closeNode(mixed $node[, mixed $delimiter = PHP_EOL ][, mixed $space = true ]) : mixed
Parameters
$node : mixed
$delimiter : mixed = PHP_EOL
$space : mixed = true
Return values
mixed

export()

Export Module as a zip file.

public export(Module $moduleInstance[, string $todir = '' ][, string $zipFileName = '' ][, bool $directDownload = false ]) : mixed
Parameters
$moduleInstance : Module

Instance of module

$todir : string = ''

Output directory path

$zipFileName : string = ''

Zipfilename to use

$directDownload : bool = false

True for sending the output as download

Return values
mixed

exportBlocks()

Export module blocks with its related fields.

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

exportCronTasks()

Export cron tasks for the module.

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

Export custom links of the module.

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

exportCustomViews()

Export Custom views of the module.

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

exportDependencies()

Export vtiger dependencies.

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

exportFields()

Export fields related to a module block.

public exportFields(ModuleBasic $moduleInstance, int $blockid) : mixed
Parameters
$moduleInstance : ModuleBasic
$blockid : int
Return values
mixed

exportInventory()

Export module inventory fields.

public exportInventory() : mixed
Return values
mixed

exportModule()

Export Module Handler.

public exportModule() : mixed
Return values
mixed

exportRelatedLists()

Export related lists associated with module.

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

exportSharingAccess()

Export Sharing Access of the module.

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

exportTables()

Export module base and related tables.

public exportTables() : mixed
Return values
mixed

getAuthorEmail()

Get package author phone email.

public getAuthorEmail() : mixed
Return values
mixed

getAuthorName()

Get package author name.

public getAuthorName() : mixed
Return values
mixed

getAuthorPhone()

Get package author phone number.

public getAuthorPhone() : mixed
Return values
mixed

getAvailableModuleInfoFromModuleBundle()

public getAvailableModuleInfoFromModuleBundle() : array<string|int, mixed>
Return values
array<string|int, mixed>

module list available in the module bundle

getDependentMaxVtigerVersion()

Get dependent Maximum version.

public getDependentMaxVtigerVersion() : mixed
Return values
mixed

getDependentVtigerVersion()

Get dependent version.

public getDependentVtigerVersion() : string
Return values
string

getDescription()

Get package author phone email.

public getDescription() : mixed
Return values
mixed

getLicense()

Get the license of this package NOTE: checkzip should have been called earlier.

public getLicense() : mixed
Return values
mixed

getModuleName()

returns the name of the module.

public getModuleName() : string
Return values
string
  • name of the module as given in manifest file

getModuleNameFromZip()

Get module name packaged in the zip file.

public getModuleNameFromZip(mixed $zipfile) : mixed
Parameters
$zipfile : mixed
Return values
mixed

getParameters()

public getParameters() : mixed
Return values
mixed

getPremium()

Get premium.

public getPremium() : int
Return values
int

getTemporaryFilePath()

public getTemporaryFilePath([mixed $filepath = false ]) : mixed
Parameters
$filepath : mixed = false
Return values
mixed

getTypeName()

Get type of package (as specified in manifest).

public getTypeName() : mixed
Return values
mixed

getUpdateInfo()

public getUpdateInfo() : mixed
Return values
mixed

getVersion()

Get package version.

public getVersion() : mixed
Return values
mixed

getZipFileName()

Get last name of zip file.

public getZipFileName() : string
Return values
string

import()

Import Module from zip file.

public import(mixed $zipfile[, mixed $overwrite = false ]) : mixed
Parameters
$zipfile : mixed
$overwrite : mixed = false
Return values
mixed

importAction()

Import action of the module.

public importAction(mixed $modulenode, mixed $moduleInstance, mixed $actionnode) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
$actionnode : mixed
Return values
mixed

importActions()

Import actions of the module.

public importActions(mixed $modulenode, mixed $moduleInstance) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
Return values
mixed

importBlock()

Import Block of the module.

public importBlock(mixed $modulenode, mixed $moduleInstance, mixed $blocknode) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
$blocknode : mixed
Return values
mixed

importBlocks()

Import Blocks of the module.

public importBlocks(mixed $modulenode, mixed $moduleInstance) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
Return values
mixed

importCronTasks()

Import cron jobs of the module.

public importCronTasks(mixed $modulenode) : mixed
Parameters
$modulenode : mixed
Return values
mixed

Import custom links of the module.

public importCustomLinks(mixed $modulenode, mixed $moduleInstance) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
Return values
mixed

importCustomView()

Import Custom View of the module.

public importCustomView(mixed $modulenode, mixed $moduleInstance, mixed $customviewnode) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
$customviewnode : mixed
Return values
mixed

importCustomViews()

Import Custom views of the module.

public importCustomViews(mixed $modulenode, mixed $moduleInstance) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
Return values
mixed

importEvents()

Import Events of the module.

public importEvents(mixed $modulenode, mixed $moduleInstance) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
Return values
mixed

importField()

Import Field of the module.

public importField(mixed $blocknode, mixed $blockInstance, mixed $moduleInstance, mixed $fieldnode) : mixed
Parameters
$blocknode : mixed
$blockInstance : mixed
$moduleInstance : mixed
$fieldnode : mixed
Return values
mixed

importFields()

Import Fields of the module.

public importFields(mixed $blocknode, mixed $blockInstance, mixed $moduleInstance) : mixed
Parameters
$blocknode : mixed
$blockInstance : mixed
$moduleInstance : mixed
Return values
mixed

importFont()

Import font package.

public importFont(string $zipfile) : mixed
Parameters
$zipfile : string
Tags
throws
AppException
Return values
mixed

importInRelatedlist()

public importInRelatedlist(mixed $modulenode, mixed $moduleInstance, mixed $inRelatedListNode) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
$inRelatedListNode : mixed
Return values
mixed

importInventory()

Import inventory fields of the module.

public importInventory() : mixed
Return values
mixed

importModule()

Import Module.

public importModule() : mixed
Return values
mixed

importRelatedlist()

Import related list of the module.

public importRelatedlist(mixed $modulenode, mixed $moduleInstance, mixed $relatedlistnode) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
$relatedlistnode : mixed
Return values
mixed

importRelatedLists()

Import related lists of the module.

public importRelatedLists(mixed $modulenode, mixed $moduleInstance) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
Return values
mixed

importSharingAccess()

Import Sharing Access of the module.

public importSharingAccess(mixed $modulenode, mixed $moduleInstance) : mixed
Parameters
$modulenode : mixed
$moduleInstance : mixed
Return values
mixed

importTables()

Import Tables of the module.

public importTables(mixed $modulenode) : mixed
Parameters
$modulenode : mixed
Return values
mixed

importUpdate()

public importUpdate() : mixed
Return values
mixed

initImport()

Initialize Import.

public initImport(mixed $zipfile[, mixed $overwrite = true ]) : mixed
Parameters
$zipfile : mixed
$overwrite : mixed = true
Return values
mixed

isExtensionType()

Are we trying to import extension package?

public isExtensionType([mixed|null $zipfile = null ]) : mixed
Parameters
$zipfile : mixed|null = null
Return values
mixed

isFontType()

Checks font package type.

public isFontType([null $zipfile = null ]) : bool
Parameters
$zipfile : null = null
Return values
bool

isLanguageType()

Are we trying to import language package?

public isLanguageType([mixed|null $zipfile = null ]) : mixed
Parameters
$zipfile : mixed|null = null
Return values
mixed

isLayoutType()

Are we trying to import language package?

public isLayoutType([mixed|null $zipfile = null ]) : mixed
Parameters
$zipfile : mixed|null = null
Return values
mixed

isModuleBundle()

checks whether a package is module bundle or not.

public isModuleBundle([string $zipfile = null ]) : bool
Parameters
$zipfile : string = null
  • path to the zip file
Return values
bool
  • true if given zipfile is a module bundle and false otherwise

isUpdateType()

public isUpdateType([mixed $zipfile = null ]) : mixed
Parameters
$zipfile : mixed = null
Return values
mixed

openNode()

Output Handlers

public openNode(mixed $node[, mixed $delimiter = PHP_EOL ]) : mixed
Parameters
$node : mixed
$delimiter : mixed = PHP_EOL
Return values
mixed

outputNode()

public outputNode(mixed $value[, mixed $node = '' ]) : mixed
Parameters
$value : mixed
$node : mixed = ''
Return values
mixed

type()

Get type of package (as specified in manifest).

public type() : false|string
Return values
false|string

xpath()

XPath evaluation on the root module node.

public xpath(mixed $path) : mixed
Parameters
$path : mixed
Return values
mixed

        

Search results