Documentation

Calendar_ExportToIcal_Model extends Vtiger_Export_Model
in package

Calendar export model class.

Tags
copyright

YetiForce Sp. z o.o

license

YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com)

author

Arkadiusz Adach a.adach@yetiforce.com

Table of Contents

$exportType  : string
The type of exported file.
$fileExtension  : string
File extension.
$focus  : mixed
$moduleFieldInstances  : array<string|int, Vtiger_Field_Model>
Field model instance.
$moduleInstance  : Vtiger_Module_Model
Module model.
$moduleName  : mixed
$queryOptions  : array<string|int, mixed>
Query options.
$recordsListFromRequest  : mixed
$value  : mixed
$fieldDataTypeCache  : mixed
$picklistValues  : mixed
__construct()  : mixed
Constructor.
exportData()  : mixed
Function exports the data based on the mode.
get()  : mixed
Function to get the value for a given key.
getArray()  : array<string|int, mixed>
Function to get the array values for a given key.
getData()  : array<string|int, mixed>
Function to get all the values of the Object.
getExportContentType()  : string
Function returns the export type - This can be extended to support different file exports.
getExportQuery()  : Query
Function that generates Export Query based on the mode.
getFileName()  : string
getForHtml()  : mixed
Function to get the html encoded value for a given key.
getForSql()  : mixed
Function to get the value if its safe to use for SQL Query (column).
getHeaders()  : array<string|int, mixed>
Get file headers.
getInstance()  : self
Get instance.
getInstanceFromRequest()  : self
Get instance from request.
getKeys()  : array<string|int, string>
Function to get keys.
getModuleName()  : mixed
getSupportedFileFormats()  : array<string|int, mixed>
Get supported file formats.
has()  : bool
Function to check if the key exists.
initializeFromRequest()  : mixed
Initialize from request.
isEmpty()  : bool
Function to check if the key is empty.
output()  : mixed
Function that create the exported file.
remove()  : mixed
Function to remove the value.
sanitizeInventoryValues()  : array<string|int, mixed>
Sanitize inventory values.
sanitizeValues()  : mixed
this function takes in an array of values for an user and sanitizes it for export Requires modification after adding a new field type.
sendHttpHeader()  : mixed
Send HTTP Header.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setRecordList()  : mixed

Properties

$exportType

The type of exported file.

protected string $exportType = 'csv'

$fileExtension

File extension.

protected string $fileExtension = 'ics'

$moduleFieldInstances

Field model instance.

protected array<string|int, Vtiger_Field_Model> $moduleFieldInstances

$moduleInstance

Module model.

protected Vtiger_Module_Model $moduleInstance

$moduleName

protected mixed $moduleName

$queryOptions

Query options.

protected array<string|int, mixed> $queryOptions

$recordsListFromRequest

protected mixed $recordsListFromRequest = []

$value

protected mixed $value

$fieldDataTypeCache

private mixed $fieldDataTypeCache = []

$picklistValues

private mixed $picklistValues

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
$values : array<string|int, mixed> = []
Return values
mixed

exportData()

Function exports the data based on the mode.

public exportData() : mixed
Return values
mixed

get()

Function to get the value for a given key.

public get(string $key) : mixed
Parameters
$key : string
Return values
mixed

Value for the given key

getArray()

Function to get the array values for a given key.

public getArray(string $key[, array<string|int, mixed> $value = [] ]) : array<string|int, mixed>
Parameters
$key : string
$value : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getData()

Function to get all the values of the Object.

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

getExportContentType()

Function returns the export type - This can be extended to support different file exports.

public getExportContentType() : string
Return values
string

getExportQuery()

Function that generates Export Query based on the mode.

public getExportQuery() : Query
Tags
throws
Exception
Return values
Query

getFileName()

public getFileName() : string
Return values
string

getForHtml()

Function to get the html encoded value for a given key.

public getForHtml(string $key) : mixed
Parameters
$key : string
Return values
mixed

getForSql()

Function to get the value if its safe to use for SQL Query (column).

public getForSql(string $key[, bool $skipEmtpy = true ]) : mixed
Parameters
$key : string
$skipEmtpy : bool = true

Skip the check if string is empty

Return values
mixed

Value for the given key

getHeaders()

Get file headers.

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

getInstance()

Get instance.

public static getInstance(string $moduleName[, string $exportType = 'csv' ]) : self
Parameters
$moduleName : string
$exportType : string = 'csv'
Return values
self

getInstanceFromRequest()

Get instance from request.

public static getInstanceFromRequest(Request $request) : self
Parameters
$request : Request
Return values
self

getKeys()

Function to get keys.

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

getModuleName()

public getModuleName() : mixed
Return values
mixed

getSupportedFileFormats()

Get supported file formats.

public static getSupportedFileFormats(string $moduleName) : array<string|int, mixed>
Parameters
$moduleName : string
Return values
array<string|int, mixed>

has()

Function to check if the key exists.

public has(string $key) : bool
Parameters
$key : string
Return values
bool

initializeFromRequest()

Initialize from request.

public initializeFromRequest(Request $request) : mixed
Parameters
$request : Request
Tags
throws
IllegalValue
Return values
mixed

isEmpty()

Function to check if the key is empty.

public isEmpty(string $key) : bool
Parameters
$key : string
Return values
bool

output()

Function that create the exported file.

public output(mixed $headers, mixed $entries) : mixed
Parameters
$headers : mixed
  • output file header
$entries : mixed
  • outfput file data
Return values
mixed

remove()

Function to remove the value.

public remove(string $key) : mixed
Parameters
$key : string
Return values
mixed

sanitizeInventoryValues()

Sanitize inventory values.

public sanitizeInventoryValues(array<string|int, mixed> $inventoryRow, array<string|int, mixed> $inventoryFields) : array<string|int, mixed>
Parameters
$inventoryRow : array<string|int, mixed>
$inventoryFields : array<string|int, mixed>
Return values
array<string|int, mixed>

sanitizeValues()

this function takes in an array of values for an user and sanitizes it for export Requires modification after adding a new field type.

public sanitizeValues(mixed $arr) : mixed
Parameters
$arr : mixed
  • the array of values
Return values
mixed

sendHttpHeader()

Send HTTP Header.

public sendHttpHeader() : mixed
Return values
mixed

set()

Function to set the value for a given key.

public set(string $key, mixed $value) : $this
Parameters
$key : string
$value : mixed
Return values
$this

setData()

Function to set all the values.

public setData(mixed $values) : $this
Parameters
$values : mixed
Return values
$this

setRecordList()

public setRecordList(mixed $listId) : mixed
Parameters
$listId : mixed
Return values
mixed

Search results