Documentation

Settings_Picklist_Field_Model extends Settings_Vtiger_Field_Model
in package

Field Model Class.

Table of Contents

getFieldDataType()  : mixed
{@inheritdoc}
getInstance()  : self
Function to get instance.
getInstanceFromFieldObject()  : Vtiger_Field_Model
Static Function to get the instance fo Vtiger Field Model from a given vtlib\Field object.
getItemModel()  : Item
Get picklist value model.
getModuleName()  : mixed
{@inheritdoc}
getPicklistValuesForRole()  : type
Function which will give the picklistvalues for given roleids.
getValidator()  : mixed
{@inheritdoc}
isDuplicateValue()  : bool
Check if picklist value exists.
isEditable()  : bool
Function to check whether the current field is editable.
isNameField()  : bool
Function to check if the field is named field of the module.
isReadOnly()  : bool
Function to check whether the current field is read-only.
validate()  : mixed
Verification of data.

Methods

getFieldDataType()

{@inheritdoc}

public getFieldDataType() : mixed
Return values
mixed

getInstance()

Function to get instance.

public static getInstance(string|int $value[, Settings_Picklist_Module_Model|Vtiger_Module_Model|bool $module = false ]) : self
Parameters
$value : string|int

fieldname or fieldid

$module : Settings_Picklist_Module_Model|Vtiger_Module_Model|bool = false

module instance

Return values
self

getInstanceFromFieldObject()

Static Function to get the instance fo Vtiger Field Model from a given vtlib\Field object.

public static getInstanceFromFieldObject(Field $fieldObj) : Vtiger_Field_Model
Parameters
$fieldObj : Field
  • vtlib field object
Return values
Vtiger_Field_Model

instance

getItemModel()

Get picklist value model.

public getItemModel([int|null $itemId = null ]) : Item
Parameters
$itemId : int|null = null
Return values
Item

getModuleName()

{@inheritdoc}

public getModuleName() : mixed
Return values
mixed

getPicklistValuesForRole()

Function which will give the picklistvalues for given roleids.

public getPicklistValuesForRole(type $roleIdList[, type $groupMode = 'INTERSECTION' ]) : type
Parameters
$roleIdList : type

-- array of role ids

$groupMode : type = 'INTERSECTION'

-- Intersection/Conjuction , intersection will give only picklist values that exist for all roles

Return values
type

-- array

getValidator()

{@inheritdoc}

public getValidator() : mixed
Return values
mixed

isDuplicateValue()

Check if picklist value exists.

public isDuplicateValue(string $value[, int|null $id = null ]) : bool
Parameters
$value : string
$id : int|null = null
Return values
bool

isEditable()

Function to check whether the current field is editable.

public isEditable() : bool
Return values
bool

isNameField()

Function to check if the field is named field of the module.

public isNameField() : bool
Return values
bool

isReadOnly()

Function to check whether the current field is read-only.

public isReadOnly() : bool
Return values
bool

validate()

Verification of data.

public validate(string $value[, int $id = false ]) : mixed
Parameters
$value : string
$id : int = false
Tags
throws
Exception
Return values
mixed

        

Search results