Field
in package
Field basic class.
Tags
Table of Contents
- HELP_INFO_VIEWS = ['LBL_EDIT_VIEW' => 'Edit', 'LBL_DETAIL_VIEW' => 'Detail', 'LBL_QUICK_CREATE_VIEW' => 'QuickCreateAjax']
- SYSTEM_FIELDS = ['assigned_user_id' => ['validationConditions' => ['name'], 'name' => 'assigned_user_id', 'column' => 'smownerid', 'label' => 'Assigned To', 'table' => 'vtiger_crmentity', 'uitype' => 53, 'typeofdata' => 'V~M', 'maximumlength' => 65535], 'createdtime' => ['validationConditions' => ['name'], 'name' => 'createdtime', 'column' => 'createdtime', 'label' => 'Created Time', 'table' => 'vtiger_crmentity', 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535], 'modifiedtime' => ['validationConditions' => ['name'], 'name' => 'modifiedtime', 'column' => 'modifiedtime', 'label' => 'Modified Time', 'table' => 'vtiger_crmentity', 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535], 'created_user_id' => ['validationConditions' => ['column'], 'name' => 'created_user_id', 'column' => 'smcreatorid', 'label' => 'Created By', 'table' => 'vtiger_crmentity', 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535], 'modifiedby' => ['validationConditions' => ['name'], 'name' => 'modifiedby', 'column' => 'modifiedby', 'label' => 'Last Modified By', 'table' => 'vtiger_crmentity', 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535], 'shownerid' => ['validationConditions' => ['name'], 'name' => 'shownerid', 'column' => 'shownerid', 'label' => 'Share with users', 'table' => 'vtiger_crmentity', 'uitype' => 120, 'typeofdata' => 'V~O', 'columntype' => 'int(11)', 'maximumlength' => 65535], 'private' => ['validationConditions' => ['name'], 'name' => 'private', 'column' => 'private', 'label' => 'FL_IS_PRIVATE', 'table' => 'vtiger_crmentity', 'uitype' => 56, 'typeofdata' => 'C~O', 'columntype' => 'int(11)', 'maximumlength' => '-128,127', 'presence' => 2, 'generatedtype' => 2], 'share_externally' => ['validationConditions' => ['uitype', 'fieldparams'], 'name' => 'share_externally', 'column' => 'share_externally', 'label' => 'FL_SHARE_EXTERNALLY', 'defaultvalue' => 0, 'fieldparams' => 1, 'uitype' => 318, 'typeofdata' => 'C~O', 'columntype' => 'tinyint(1)', 'maximumlength' => '-128,127']]
- $columnPermissionCacheRead : mixed
- $columnPermissionCacheWrite : mixed
- $fieldPermissionCacheRead : mixed
- $fieldPermissionCacheWrite : mixed
- checkQuickChangerConditions() : void
- Check quick changer conditions.
- getColumnPermission() : bool
- Function checks field permissions by column name.
- getCustomListForDefaultValue() : array<string|int, string>
- Get a list of custom default values for a given field type in the WebservicePremium API.
- getFieldInfo() : array<string|int, mixed>|null
- Function to gets module field info.
- getFieldPermission() : bool
- Function checks field permissions by field name or field id.
- getFieldsFromRelation() : array<string|int, string>
- Get fields from relation by relation Id.
- getFieldsPermissions() : array<string|int, mixed>
- Function gets the list of fields that the user has permissions to.
- getFieldsTypeFromUIType() : array<string|int, mixed>
- Get fields type from uitype.
- getModuleFieldInfos() : array<string|int, mixed>
- Function get module field infos.
- getModuleFieldInfosByPresence() : array<string|int, mixed>
- Function get module field infos by presence.
- getQuickChangerFields() : array<string|int, mixed>
- Get quick changer fields.
- getRelatedFieldForModule() : array<string|int, mixed>
- Get related field for module.
Constants
HELP_INFO_VIEWS
public
array<string|int, string>
HELP_INFO_VIEWS
= ['LBL_EDIT_VIEW' => 'Edit', 'LBL_DETAIL_VIEW' => 'Detail', 'LBL_QUICK_CREATE_VIEW' => 'QuickCreateAjax']
Help info views.
SYSTEM_FIELDS
public
array<string|int, mixed>
SYSTEM_FIELDS
= ['assigned_user_id' => ['validationConditions' => ['name'], 'name' => 'assigned_user_id', 'column' => 'smownerid', 'label' => 'Assigned To', 'table' => 'vtiger_crmentity', 'uitype' => 53, 'typeofdata' => 'V~M', 'maximumlength' => 65535], 'createdtime' => ['validationConditions' => ['name'], 'name' => 'createdtime', 'column' => 'createdtime', 'label' => 'Created Time', 'table' => 'vtiger_crmentity', 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535], 'modifiedtime' => ['validationConditions' => ['name'], 'name' => 'modifiedtime', 'column' => 'modifiedtime', 'label' => 'Modified Time', 'table' => 'vtiger_crmentity', 'uitype' => 70, 'typeofdata' => 'DT~O', 'displaytype' => 2, 'maximumlength' => 65535], 'created_user_id' => ['validationConditions' => ['column'], 'name' => 'created_user_id', 'column' => 'smcreatorid', 'label' => 'Created By', 'table' => 'vtiger_crmentity', 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535], 'modifiedby' => ['validationConditions' => ['name'], 'name' => 'modifiedby', 'column' => 'modifiedby', 'label' => 'Last Modified By', 'table' => 'vtiger_crmentity', 'uitype' => 52, 'typeofdata' => 'V~O', 'displaytype' => 2, 'quickcreate' => 3, 'masseditable' => 0, 'maximumlength' => 65535], 'shownerid' => ['validationConditions' => ['name'], 'name' => 'shownerid', 'column' => 'shownerid', 'label' => 'Share with users', 'table' => 'vtiger_crmentity', 'uitype' => 120, 'typeofdata' => 'V~O', 'columntype' => 'int(11)', 'maximumlength' => 65535], 'private' => ['validationConditions' => ['name'], 'name' => 'private', 'column' => 'private', 'label' => 'FL_IS_PRIVATE', 'table' => 'vtiger_crmentity', 'uitype' => 56, 'typeofdata' => 'C~O', 'columntype' => 'int(11)', 'maximumlength' => '-128,127', 'presence' => 2, 'generatedtype' => 2], 'share_externally' => ['validationConditions' => ['uitype', 'fieldparams'], 'name' => 'share_externally', 'column' => 'share_externally', 'label' => 'FL_SHARE_EXTERNALLY', 'defaultvalue' => 0, 'fieldparams' => 1, 'uitype' => 318, 'typeofdata' => 'C~O', 'columntype' => 'tinyint(1)', 'maximumlength' => '-128,127']]
System fields
Properties
$columnPermissionCacheRead
private
static mixed
$columnPermissionCacheRead
= []
$columnPermissionCacheWrite
private
static mixed
$columnPermissionCacheWrite
= []
$fieldPermissionCacheRead
private
static mixed
$fieldPermissionCacheRead
= []
$fieldPermissionCacheWrite
private
static mixed
$fieldPermissionCacheWrite
= []
Methods
checkQuickChangerConditions()
Check quick changer conditions.
public
static checkQuickChangerConditions(array<string|int, mixed> $field, Vtiger_Record_Model $recordModel) : void
Parameters
- $field : array<string|int, mixed>
- $recordModel : Vtiger_Record_Model
Return values
void —getColumnPermission()
Function checks field permissions by column name.
public
static getColumnPermission(int|string $tabMix, string $columnName[, bool $readOnly = true ]) : bool
Parameters
- $tabMix : int|string
-
Module ID or module name
- $columnName : string
-
Field ID or field name
- $readOnly : bool = true
-
Read/preview only fields
Return values
bool —getCustomListForDefaultValue()
Get a list of custom default values for a given field type in the WebservicePremium API.
public
static getCustomListForDefaultValue(Vtiger_Field_Model $fieldModel) : array<string|int, string>
Parameters
- $fieldModel : Vtiger_Field_Model
Return values
array<string|int, string> —getFieldInfo()
Function to gets module field info.
public
static getFieldInfo(int|string $mixed[, int|string $module = false ]) : array<string|int, mixed>|null
Parameters
- $mixed : int|string
- $module : int|string = false
Return values
array<string|int, mixed>|null —getFieldPermission()
Function checks field permissions by field name or field id.
public
static getFieldPermission(int|string $tabMix, int|string $fieldMix[, bool $readOnly = true ]) : bool
Parameters
- $tabMix : int|string
-
Module ID or module name
- $fieldMix : int|string
-
Field ID or field name
- $readOnly : bool = true
-
Read/preview only fields
Return values
bool —getFieldsFromRelation()
Get fields from relation by relation Id.
public
static getFieldsFromRelation(int $relationId) : array<string|int, string>
Parameters
- $relationId : int
Return values
array<string|int, string> —getFieldsPermissions()
Function gets the list of fields that the user has permissions to.
public
static getFieldsPermissions(int $tabId[, type $readOnly = true ]) : array<string|int, mixed>
Parameters
- $tabId : int
-
Module ID
- $readOnly : type = true
-
Read/preview only fields
Return values
array<string|int, mixed> —getFieldsTypeFromUIType()
Get fields type from uitype.
public
static getFieldsTypeFromUIType() : array<string|int, mixed>
Return values
array<string|int, mixed> —getModuleFieldInfos()
Function get module field infos.
public
static getModuleFieldInfos(int|string $module[, bool $returnByColumn = false ]) : array<string|int, mixed>
Parameters
- $module : int|string
- $returnByColumn : bool = false
Return values
array<string|int, mixed> —getModuleFieldInfosByPresence()
Function get module field infos by presence.
public
static getModuleFieldInfosByPresence(int|string $module[, array<string|int, mixed> $presence = ['0', '2'] ]) : array<string|int, mixed>
Parameters
- $module : int|string
- $presence : array<string|int, mixed> = ['0', '2']
Return values
array<string|int, mixed> —getQuickChangerFields()
Get quick changer fields.
public
static getQuickChangerFields(int $tabId) : array<string|int, mixed>
Parameters
- $tabId : int
Return values
array<string|int, mixed> —getRelatedFieldForModule()
Get related field for module.
public
static getRelatedFieldForModule([bool|string $moduleName = false ][, bool|string $forModule = false ]) : array<string|int, mixed>
Parameters
- $moduleName : bool|string = false
- $forModule : bool|string = false