Picklist
in package
Tools class for picklist.
Table of Contents
- clearCache() : mixed
- Clear cache.
- getColors() : array<string|int, mixed>
- Get colors for all fields or generate it if not exists.
- getDependencyForModule() : array<string|int, mixed>
- Function to get picklist dependency data source.
- getEditableValues() : array<string|int, mixed>
- Function which will give the editable picklist values for a field.
- getIcon() : array<string|int, mixed>
- Get icon data for picklist value.
- getModules() : array<string|int, mixed>
- Function to get modules which has picklist values.
- getModulesByName() : array<string|int, mixed>
- Get modules with field names which are picklists.
- getNonEditableValues() : array<string|int, mixed>
- Function which will give the non editable picklist values for a field.
- getPickListId() : string
- Function to get picklist key for a picklist.
- getPicklistIdNr() : int
- Get picklist ID number.
- getPickListTableName() : string
- Get picklist table name.
- getRoleBasedValues() : array<string|int, mixed>
- Function to get role based picklist values.
- getValues() : array<string|int, mixed>
- Function which will give the picklist values rows for a field.
- getValuesName() : array<string|int, mixed>
- Function which will give the picklist values for a field.
- isDependentField() : bool
- Check if field is dependent.
- isExists() : bool
- Check if the value exists in the picklist.
- isPicklistExist() : bool
- Check if picklist exist.
- prefixExist() : bool
- Check if the prefix exists in given picklist name.
- removeDependencyConditionField() : void
- Remove dependency condition field.
Methods
clearCache()
Clear cache.
public
static clearCache(string $fieldName, string $moduleName) : mixed
Parameters
- $fieldName : string
- $moduleName : string
Return values
mixed —getColors()
Get colors for all fields or generate it if not exists.
public
static getColors(mixed $fieldName[, bool $numericKey = true ]) : array<string|int, mixed>
Parameters
- $fieldName : mixed
- $numericKey : bool = true
Return values
array<string|int, mixed> —[$id=>'#FF00FF']
getDependencyForModule()
Function to get picklist dependency data source.
public
static getDependencyForModule(string $moduleName) : array<string|int, mixed>
Parameters
- $moduleName : string
Return values
array<string|int, mixed> —getEditableValues()
Function which will give the editable picklist values for a field.
public
static getEditableValues(string $fieldName) : array<string|int, mixed>
Parameters
- $fieldName : string
-
-- string
Return values
array<string|int, mixed> —-- array of values
getIcon()
Get icon data for picklist value.
public
static getIcon(string $fieldName, string $value) : array<string|int, mixed>
Parameters
- $fieldName : string
- $value : string
Return values
array<string|int, mixed> —getModules()
Function to get modules which has picklist values.
public
static getModules() : array<string|int, mixed>
Return values
array<string|int, mixed> —getModulesByName()
Get modules with field names which are picklists.
public
static getModulesByName([string $moduleName = '' ]) : array<string|int, mixed>
Parameters
- $moduleName : string = ''
-
if you want only one module picklist fieldnames
Return values
array<string|int, mixed> —associative array [$moduleName=>[...$fieldNames]]
getNonEditableValues()
Function which will give the non editable picklist values for a field.
public
static getNonEditableValues(string $fieldName) : array<string|int, mixed>
Parameters
- $fieldName : string
-
-- string
Return values
array<string|int, mixed> —-- array of values
getPickListId()
Function to get picklist key for a picklist.
public
static getPickListId(string $fieldName) : string
Parameters
- $fieldName : string
Return values
string —getPicklistIdNr()
Get picklist ID number.
public
static getPicklistIdNr(string $fieldName) : int
Parameters
- $fieldName : string
Return values
int —getPickListTableName()
Get picklist table name.
public
static getPickListTableName(string $fieldName) : string
Parameters
- $fieldName : string
Return values
string —getRoleBasedValues()
Function to get role based picklist values.
public
static getRoleBasedValues(string $fieldName, string $roleId) : array<string|int, mixed>
Parameters
- $fieldName : string
- $roleId : string
Return values
array<string|int, mixed> —list of role based picklist values
getValues()
Function which will give the picklist values rows for a field.
public
static getValues(string $fieldName) : array<string|int, mixed>
Parameters
- $fieldName : string
-
-- string
Return values
array<string|int, mixed> —-- array of values
getValuesName()
Function which will give the picklist values for a field.
public
static getValuesName(string $fieldName) : array<string|int, mixed>
Parameters
- $fieldName : string
-
-- string
Return values
array<string|int, mixed> —-- array of values
isDependentField()
Check if field is dependent.
public
static isDependentField(string $moduleName, string $fieldName) : bool
Parameters
- $moduleName : string
- $fieldName : string
Return values
bool —isExists()
Check if the value exists in the picklist.
public
static isExists(string $fieldName, string $value) : bool
Parameters
- $fieldName : string
- $value : string
Return values
bool —isPicklistExist()
Check if picklist exist.
public
static isPicklistExist(string $fieldName) : bool
Parameters
- $fieldName : string
Return values
bool —prefixExist()
Check if the prefix exists in given picklist name.
public
static prefixExist(string $fieldName) : bool
Parameters
- $fieldName : string
Return values
bool —removeDependencyConditionField()
Remove dependency condition field.
public
static removeDependencyConditionField(string $moduleName, string $fieldName) : void
Parameters
- $moduleName : string
- $fieldName : string