Documentation

LanguageImport extends LanguageExport
in package

Provides API to import language into vtiger CRM.

Table of Contents

TABLENAME  = 'vtiger_language'
$_errorText  : mixed
$_export_modulexml_file  : mixed
$_export_modulexml_filename  : mixed
$_export_tmpdir  : mixed
$_licensetext  : mixed
License of the package.
$_migrationinfo  : mixed
$_modulefields_cache  : mixed
Module Fields mapped by [modulename][fieldname] which will be used to create customviews.
$_modulexml  : mixed
Module Meta XML File (Parsed).
$listBlocks  : mixed
$listFields  : mixed
$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
deregister()  : mixed
De-Register language pack information.
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.
exportLanguage()  : mixed
Export Module as a zip file.
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.
getAll()  : mixed
Get all the language information.
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
getPrefix()  : 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.
handleMigration()  : mixed
Handle migration of the module.
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.
importLanguage()  : mixed
Import 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
initUpdate()  : mixed
Initialize Update.
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
parseMigration()  : mixed
Parse migration information from manifest.
register()  : mixed
Register language pack information.
type()  : false|string
Get type of package (as specified in manifest).
update()  : mixed
Update Module from zip file.
updateAction()  : mixed
Update action of the module.
updateActions()  : mixed
Update actions of the module.
updateBlock()  : mixed
Update Block of the module.
updateBlocks()  : mixed
Update Blocks of the module.
updateCronTasks()  : mixed
updateCustomLinks()  : mixed
updateCustomView()  : mixed
Update Custom View of the module.
updateCustomViews()  : mixed
Import Custom views of the module.
updateEvents()  : mixed
Update Events of the module.
updateField()  : mixed
Update Field of the module.
updateFields()  : mixed
Update Fields of the module.
updateInRelatedlist()  : mixed
updateModule()  : mixed
Update Module.
updateRelatedlist()  : mixed
Import related list of the module.
updateRelatedLists()  : mixed
Update related lists of the module.
updateSharingAccess()  : mixed
Update Sharing Access of the module.
updateTables()  : mixed
Update Tables of the module.
xpath()  : mixed
XPath evaluation on the root module node.
generateLangMainfest()  : mixed
Export Language Handler.

Constants

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

deregister()

De-Register language pack information.

public static deregister(string $prefix) : mixed
Parameters
$prefix : string

Language prefix like (de-De) etc

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

exportLanguage()

Export Module as a zip file.

public exportLanguage(string $languageCode[, string $todir = '' ][, string $zipfilename = '' ][, bool $directDownload = false ]) : mixed
Parameters
$languageCode : string

Module Instance of module

$todir : string = ''

Path Output directory path

$zipfilename : string = ''
$directDownload : bool = false

True for sending the output as download

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

getAll()

Get all the language information.

public static getAll([bool $includeInActive = false ]) : mixed
Parameters
$includeInActive : bool = false

true to include in-active languages also, false (default)

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

handleMigration()

Handle migration of the module.

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

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

importLanguage()

Import Module.

public importLanguage(string $zipfile) : mixed
Parameters
$zipfile : string
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

initUpdate()

Initialize Update.

public initUpdate(mixed $moduleInstance, mixed $zipfile, mixed $overwrite) : mixed
Parameters
$moduleInstance : mixed
$zipfile : mixed
$overwrite : mixed
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

parseMigration()

Parse migration information from manifest.

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

register()

Register language pack information.

public static register(string $prefix[, string $name = '' ][, bool|null $isDefault = false ][, bool $isActive = true ], int $progress) : mixed
Parameters
$prefix : string
$name : string = ''
$isDefault : bool|null = false
$isActive : bool = true
$progress : int
Tags
throws
Exception
Return values
mixed

type()

Get type of package (as specified in manifest).

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

update()

Update Module from zip file.

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

updateAction()

Update action of the module.

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

updateActions()

Update actions of the module.

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

updateBlock()

Update Block of the module.

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

updateBlocks()

Update Blocks of the module.

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

updateCronTasks()

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

updateCustomView()

Update Custom View of the module.

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

updateCustomViews()

Import Custom views of the module.

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

updateEvents()

Update Events of the module.

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

updateField()

Update Field of the module.

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

updateFields()

Update Fields of the module.

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

updateInRelatedlist()

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

updateModule()

Update Module.

public updateModule(mixed $moduleInstance) : mixed
Parameters
$moduleInstance : mixed
Return values
mixed

updateRelatedlist()

Import related list of the module.

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

updateRelatedLists()

Update related lists of the module.

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

updateSharingAccess()

Update Sharing Access of the module.

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

updateTables()

Update Tables of the module.

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

xpath()

XPath evaluation on the root module node.

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

generateLangMainfest()

Export Language Handler.

private generateLangMainfest(string $prefix) : mixed
Parameters
$prefix : string
Return values
mixed

        

Search results