Documentation

Settings_AutomaticAssignment_Record_Model extends Settings_Vtiger_Record_Model
in package

Automatic Assignment Record Model Class.

Tags
copyright

YetiForce S.A.

license

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

author

Radosław Skrzypczak r.skrzypczak@yetiforce.com

Table of Contents

$changes  : array<string|int, mixed>
$value  : array<string|int, mixed>
__construct()  : mixed
Constructor.
delete()  : bool
Function removes record.
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.
getCleanInstance()  : self
Function to get the clean instance.
getData()  : array<string|int, mixed>
Function to get all the values of the Object.
getDefaultOwner()  : int
Default owner.
getDisplayValue()  : string
Function to get the Display Value, for the current field type with given DB Insert Value.
getEditViewUrl()  : string
Function to get the Edit View Url.
getFieldInstanceByName()  : Vtiger_Field_Model
Function returns field instances for given name.
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).
getId()  : int
Function to get the Id.
getInstanceById()  : self
Function to get the instance, given id.
getKeys()  : array<string|int, string>
Function to get keys.
getModule()  : Settings_AutomaticAssignment_Module_Model
Function to get Module instance.
getName()  : string
Function to get the Role Name.
getPreviousValue()  : mixed
Get pervious value by field.
getRecordLinks()  : array<string|int, Vtiger_Link_Model>
Get record links.
getTable()  : string
Function to get table name.
getTableIndex()  : string
Function to get table primary key.
has()  : bool
Function to check if the key exists.
isActive()  : bool
Function checks if record is active.
isEmpty()  : bool
Function to check if the key is empty.
isRefreshTab()  : bool
Function defines whether given tab in edit view should be refreshed after saving.
remove()  : mixed
Function to remove the value.
save()  : mixed
Function to save.
saveToDb()  : mixed
Save data to the database.
set()  : mixed
{@inheritdoc}
setData()  : $this
Function to set all the values.
setDataFromRequest()  : mixed
Sets data from request.
setId()  : mixed
Function to set the id of the record.
setModule()  : Settings_AutomaticAssignment_Module_Model
Set module Instance.
updateHandler()  : void
Update activate/remove handler.
validate()  : mixed
getValuesToSave()  : array<string|int, mixed>
Function formats data for saving.

Properties

$changes

protected array<string|int, mixed> $changes = []

Record changes

$value

protected array<string|int, mixed> $value

Values

Methods

__construct()

Constructor.

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

delete()

Function removes record.

public delete() : bool
Return values
bool

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>

getCleanInstance()

Function to get the clean instance.

public static getCleanInstance() : self
Return values
self

getData()

Function to get all the values of the Object.

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

getDefaultOwner()

Default owner.

public getDefaultOwner() : int
Return values
int

getDisplayValue()

Function to get the Display Value, for the current field type with given DB Insert Value.

public getDisplayValue(string $name) : string
Parameters
$name : string
Return values
string

getEditViewUrl()

Function to get the Edit View Url.

public getEditViewUrl() : string
Return values
string

getFieldInstanceByName()

Function returns field instances for given name.

public getFieldInstanceByName(string $name) : Vtiger_Field_Model
Parameters
$name : string
Return values
Vtiger_Field_Model

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

getId()

Function to get the Id.

public getId() : int
Return values
int

Role Id

getInstanceById()

Function to get the instance, given id.

public static getInstanceById(int $id) : self
Parameters
$id : int
Return values
self

getKeys()

Function to get keys.

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

getName()

Function to get the Role Name.

public getName() : string
Return values
string

getPreviousValue()

Get pervious value by field.

public getPreviousValue([string $fieldName = '' ]) : mixed
Parameters
$fieldName : string = ''
Return values
mixed

Get record links.

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

getTable()

Function to get table name.

public getTable() : string
Return values
string

getTableIndex()

Function to get table primary key.

public getTableIndex() : string
Return values
string

has()

Function to check if the key exists.

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

isActive()

Function checks if record is active.

public isActive() : bool
Return values
bool

isEmpty()

Function to check if the key is empty.

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

isRefreshTab()

Function defines whether given tab in edit view should be refreshed after saving.

public isRefreshTab(string $name) : bool
Parameters
$name : string
Return values
bool

remove()

Function to remove the value.

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

save()

Function to save.

public save() : mixed
Return values
mixed

saveToDb()

Save data to the database.

public saveToDb() : mixed
Return values
mixed

set()

{@inheritdoc}

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

setData()

Function to set all the values.

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

setDataFromRequest()

Sets data from request.

public setDataFromRequest(Request $request) : mixed
Parameters
$request : Request
Return values
mixed

setId()

Function to set the id of the record.

public setId(int $value) : mixed
Parameters
$value : int
  • id value
Return values
mixed

updateHandler()

Update activate/remove handler.

public updateHandler() : void
Return values
void

validate()

public validate() : mixed
Return values
mixed

getValuesToSave()

Function formats data for saving.

private getValuesToSave(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, mixed>

        

Search results