Documentation

Settings_AutomaticAssignment_Record_Model extends Settings_Vtiger_Record_Model
in package

Automatic Assignment Record Model Class.

Tags
copyright

YetiForce Sp. z o.o

license

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

author

Radosław Skrzypczak r.skrzypczak@yetiforce.com

Table of Contents

$checkDuplicate  : bool
Variable determines the possibility of creating value duplicates.
$value  : mixed
$rawData  : array<string|int, mixed>
Raw data.
__construct()  : mixed
Constructor.
changeRoleType()  : mixed
Function changes the type of a given role.
delete()  : bool
Function removes record.
deleteElement()  : mixed
Function removes given value from record.
filterUsers()  : array<string|int, int>
Limit list of users to users with proper permissions.
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.
getAssignUser()  : int
Function returns ID of the user who has the lowest number of records.
getAvailableUsers()  : array<string|int, int>
Function returns table of available users.
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.
getEditableFields()  : array<string|int, string>
Function declare fields to edit.
getEditFields()  : array<string|int, string>
Function determines fields available in edition view.
getEditValue()  : int|array<string|int, mixed>
Function properly formats data for given field.
getEditViewTabUrl()  : string
Function returns url of selected tab in edition view.
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.
getRawData()  : array<string|int, mixed>
Function to get raw data.
getRecordLinks()  : array<string|int, Vtiger_Link_Model>
Function to get the list view actions for the record.
getSourceModuleName()  : string
Source module name.
getTable()  : string
Function to get table name.
getTableIndex()  : string
Function to get table primary key.
getUsers()  : array<string|int, int>
List of available users.
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.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setModule()  : Settings_AutomaticAssignment_Module_Model
Set module Instance.
transformAdvanceFilter()  : array<string|int, mixed>
Function transforms Advance filter to workflow conditions.
getCustomConditions()  : bool
Function supports custom user conditions.
getValueToSave()  : int|string
Function formats data for saving.

Properties

$checkDuplicate

Variable determines the possibility of creating value duplicates.

public bool $checkDuplicate = alse

$value

protected mixed $value

$rawData

Raw data.

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

Methods

__construct()

Constructor.

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

changeRoleType()

Function changes the type of a given role.

public changeRoleType(string $member) : mixed
Parameters
$member : string
Return values
mixed

delete()

Function removes record.

public delete() : bool
Return values
bool

deleteElement()

Function removes given value from record.

public deleteElement(string $name, string $value) : mixed
Parameters
$name : string
$value : string
Return values
mixed

filterUsers()

Limit list of users to users with proper permissions.

public filterUsers(array<string|int, int> $users) : array<string|int, int>
Parameters
$users : array<string|int, int>
Return values
array<string|int, int>

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>

getAssignUser()

Function returns ID of the user who has the lowest number of records.

public getAssignUser() : int
Return values
int

getAvailableUsers()

Function returns table of available users.

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

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

getEditableFields()

Function declare fields to edit.

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

getEditFields()

Function determines fields available in edition view.

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

getEditValue()

Function properly formats data for given field.

public getEditValue(string $key) : int|array<string|int, mixed>
Parameters
$key : string
Return values
int|array<string|int, mixed>

getEditViewTabUrl()

Function returns url of selected tab in edition view.

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

getRawData()

Function to get raw data.

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

Function to get the list view actions for the record.

public getRecordLinks() : array<string|int, Vtiger_Link_Model>
Return values
array<string|int, Vtiger_Link_Model>
  • Associate array of Vtiger_Link_Model instances

getSourceModuleName()

Source module name.

public getSourceModuleName() : string
Return values
string

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

getUsers()

List of available users.

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

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

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

transformAdvanceFilter()

Function transforms Advance filter to workflow conditions.

public transformAdvanceFilter(mixed $conditions) : array<string|int, mixed>
Parameters
$conditions : mixed
Return values
array<string|int, mixed>

getCustomConditions()

Function supports custom user conditions.

private getCustomConditions(User $userModel) : bool
Parameters
$userModel : User
Return values
bool

getValueToSave()

Function formats data for saving.

private getValueToSave(string $key, mixed $value) : int|string
Parameters
$key : string
$value : mixed
Return values
int|string

        

Search results