Documentation

Record
in package

Record basic class.

Table of Contents

computeLabels()  : array<string|int, string>|null
Function gets labels for record data.
getCrmIdByLabel()  : int
Function searches for record ID with given label.
getCurrencyIdFromInventory()  : int|null
Get the currency ID for the inventory record.
getHtmlLink()  : string
Get record link and label.
getIdByRecordNumber()  : int|bool
Get record id by record number .
getLabel()  : mixed
Get label.
getParentRecord()  : int|null
Get parent record.
getState()  : string
Get record state.
getType()  : string|null
Get record module name.
isExists()  : bool
Function checks if record exists.
updateLabel()  : void
Update record label.
updateLabelOnSave()  : void
Update record label on save.

Methods

computeLabels()

Function gets labels for record data.

public static computeLabels(string $moduleName, array<string|int, mixed>|int $ids[, bool $search = false ]) : array<string|int, string>|null
Parameters
$moduleName : string
$ids : array<string|int, mixed>|int
$search : bool = false
Return values
array<string|int, string>|null

getCrmIdByLabel()

Function searches for record ID with given label.

public static getCrmIdByLabel(string $moduleName, string $label[, int $userId = false ]) : int
Parameters
$moduleName : string
$label : string
$userId : int = false
Return values
int

getCurrencyIdFromInventory()

Get the currency ID for the inventory record.

public static getCurrencyIdFromInventory(int $recordId, string $moduleName) : int|null
Parameters
$recordId : int
$moduleName : string
Return values
int|null

Get record link and label.

public static getHtmlLink(int $id[, string|null $moduleName = null ][, int|null $length = null ][, bool $fullUrl = false ]) : string
Parameters
$id : int
$moduleName : string|null = null
$length : int|null = null
$fullUrl : bool = false
Return values
string

getIdByRecordNumber()

Get record id by record number .

public static getIdByRecordNumber(string $recordNumber, string $moduleName) : int|bool
Parameters
$recordNumber : string
$moduleName : string
Return values
int|bool

getLabel()

Get label.

public static getLabel(mixed $mixedId[, bool $raw = false ]) : mixed
Parameters
$mixedId : mixed
$raw : bool = false
Return values
mixed

getParentRecord()

Get parent record.

public static getParentRecord(int $recordId[, bool|string $moduleName = false ]) : int|null
Parameters
$recordId : int
$moduleName : bool|string = false
Return values
int|null

getState()

Get record state.

public static getState(int $recordId) : string
Parameters
$recordId : int
Return values
string

getType()

Get record module name.

public static getType(int $recordId) : string|null
Parameters
$recordId : int
Return values
string|null

isExists()

Function checks if record exists.

public static isExists(int $recordId[, string $moduleName = false ]) : bool
Parameters
$recordId : int
  • Record ID
$moduleName : string = false
Return values
bool

updateLabel()

Update record label.

public static updateLabel(string $moduleName, int $id) : void
Parameters
$moduleName : string
$id : int
Return values
void

        

Search results