Documentation

RecordNumber extends Base
in package

Record number class.

Tags
copyright

YetiForce S.A.

license

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

author

Tomasz Kur t.kur@yetiforce.com

author

Mariusz Krzaczkowski m.krzaczkowski@yetiforce.com

author

Radosław Skrzypczak r.skrzypczak@yetiforce.com

Table of Contents

$value  : array<string|int, mixed>
$instanceCache  : array<string|int, mixed>
Instance cache by module id.
$relatedValue  : string
Related value.
$sequenceNumberFieldCache  : array<string|int, mixed>
Sequence number field cache by module id.
__construct()  : mixed
Constructor.
cleanSequenceNumberFieldCache()  : void
Clean sequence number field cache.
date()  : false|string
Date function that can be overrided in tests.
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.
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).
getIncrementNumber()  : string
Function to get the next nuber of record.
getInstance()  : RecordNumber
Function to get instance.
getKeys()  : array<string|int, string>
Function to get keys.
getNumDataForUpdate()  : $this
Get data for update.
getRecord()  : Vtiger_Record_Model|null
Returns model of record.
getRelatedValue()  : string
Gets related value.
getSequenceNumber()  : string
Get sequence number that should be saved.
getSequenceNumberField()  : array<string|int, string>|bool
Get sequence number field.
getSequenceNumberFieldName()  : string|bool
Get sequence number field name.
has()  : bool
Function to check if the key exists.
isEmpty()  : bool
Function to check if the key is empty.
isNewSequence()  : bool
Function to check if record need a new number of sequence.
parseNumber()  : string
Parse number based on postfix and prefix.
remove()  : mixed
Function to remove the value.
save()  : int
Saves configuration.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setNumberSequence()  : mixed
Sets number of sequence.
setRecord()  : $this
Sets model of record.
updateModuleVariablesSequences()  : void
Update module variables sequences.
updateRecords()  : array<string|int, mixed>
Updates missing numbers of records.
getPicklistName()  : string
Returns name of picklist. Postfix or prefix can contains name of picklist.
getPicklistValue()  : string
Returns prefix of picklist.

Properties

$value

protected array<string|int, mixed> $value

Values

$instanceCache

Instance cache by module id.

private static array<string|int, mixed> $instanceCache = []

$relatedValue

Related value.

private string $relatedValue

$sequenceNumberFieldCache

Sequence number field cache by module id.

private static array<string|int, mixed> $sequenceNumberFieldCache = []

Methods

__construct()

Constructor.

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

cleanSequenceNumberFieldCache()

Clean sequence number field cache.

public static cleanSequenceNumberFieldCache(int|null $tabId) : void
Parameters
$tabId : int|null
Return values
void

date()

Date function that can be overrided in tests.

public static date(string $format[, int|null $time = null ]) : false|string
Parameters
$format : string
$time : int|null = null
Return values
false|string

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>

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

getIncrementNumber()

Function to get the next nuber of record.

public getIncrementNumber() : string
Return values
string

getKeys()

Function to get keys.

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

getNumDataForUpdate()

Get data for update.

public getNumDataForUpdate() : $this
Return values
$this

getRelatedValue()

Gets related value.

public getRelatedValue([bool $reload = false ]) : string
Parameters
$reload : bool = false
Return values
string

getSequenceNumber()

Get sequence number that should be saved.

public static getSequenceNumber(string $resetSequence) : string
Parameters
$resetSequence : string

one character

Return values
string

getSequenceNumberField()

Get sequence number field.

public static getSequenceNumberField(int $tabId) : array<string|int, string>|bool
Parameters
$tabId : int
Return values
array<string|int, string>|bool

getSequenceNumberFieldName()

Get sequence number field name.

public static getSequenceNumberFieldName(int $tabId) : string|bool
Parameters
$tabId : int
Return values
string|bool

has()

Function to check if the key exists.

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

isEmpty()

Function to check if the key is empty.

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

isNewSequence()

Function to check if record need a new number of sequence.

public isNewSequence() : bool
Return values
bool

parseNumber()

Parse number based on postfix and prefix.

public parseNumber(int $seq) : string
Parameters
$seq : int
Return values
string

remove()

Function to remove the value.

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

save()

Saves configuration.

public save() : int
Tags
throws
Exception
Return values
int

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

setNumberSequence()

Sets number of sequence.

public setNumberSequence(int $reqNo, string $actualSequence) : mixed
Parameters
$reqNo : int
$actualSequence : string
Tags
throws
Exception
Return values
mixed

updateModuleVariablesSequences()

Update module variables sequences.

public updateModuleVariablesSequences(int $currentId[, array<string|int, mixed> $conditions = [] ]) : void
Parameters
$currentId : int
$conditions : array<string|int, mixed> = []
Return values
void

updateRecords()

Updates missing numbers of records.

public updateRecords() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

getPicklistName()

Returns name of picklist. Postfix or prefix can contains name of picklist.

private getPicklistName() : string
Return values
string

getPicklistValue()

Returns prefix of picklist.

private getPicklistValue(string $picklistName[, string|null $recordValue = null ]) : string
Parameters
$picklistName : string
$recordValue : string|null = null
Return values
string

        

Search results