Documentation

Vtiger_Multifilter_Model extends Vtiger_Widget_Model
in package

Multifilter model.

Tags
copyright

YetiForce S.A.

license

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

author

Arkadiusz Dudek a.dudek@yetiforce.com

author

Radosław Skrzypczak r.skrzypczak@yetiforce.com

Table of Contents

DEFAULT_LABELS  = ['Activities' => 'LBL_ACTIVITIES', 'DetailView' => 'LBL_RECORD_DETAILS', 'GeneralInfo' => 'LBL_RECORD_SUMMARY']
SHOW_COMULNS  = 4
Set numer of shown columns in list.
$customFields  : array<string|int, mixed>
$editFields  : array<string|int, mixed>
$extraData  : array<string|int, mixed>
Extra data.
$filtersId  : int
Filter id.
$listviewHeaders  : array<string|int, mixed>
List of view headers.
$listViewModel  : Vtiger_ListView_Model
ListView model.
$listviewRecords  : array<string|int, mixed>
List of view records.
$modulesName  : string
Module name.
$searchParams  : array<string|int, mixed>
Search condition.
$targetModuleModel  : Vtiger_Module_Model
Target module model.
$value  : array<string|int, mixed>
$widgetModel  : Vtiger_Widget_Model
Widget model.
__construct()  : mixed
Constructor.
clearDeviceConf()  : void
Clear configuration of widgets for this device.
delete()  : bool
Remove widget template.
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.
getDashboardId()  : int
Get dashboard id.
getData()  : array<string|int, mixed>
Function to get all the values of the Object.
getDataValue()  : mixed
Gets value from data column.
getDeleteUrl()  : string
Function returns URL that will remove a widget for a User.
getEditFields()  : array<string|int, mixed>
Gets fields for edit view.
getFieldInstanceByName()  : Vtiger_Field_Model
Gets field instance by name.
getFilterId()  : int
Return filter id.
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).
getHeaderCount()  : int
Return header count.
getHeaders()  : array<string|int, mixed>
Get columns name.
getHeight()  : mixed
getId()  : int
Get ID.
getInstance()  : mixed
getInstanceFromValues()  : Vtiger_Widget_Model
Function to get the instance of Vtiger Widget Model from the given array of key-value mapping.
getInstanceWithTemplateId()  : mixed
getInstanceWithWidgetId()  : self
Get widget instance by id.
getKeys()  : array<string|int, string>
Function to get keys.
getListViewURL()  : string
Get list view URL.
getName()  : mixed
getPosition()  : int
Function to get the position of the widget.
getRecordLimit()  : int
Return record limit.
getRecords()  : array<string|int, mixed>
Return records list.
getSettingsLinks()  : array<string|int, mixed>
Function to get the Quick Links in settings view.
getTargetModule()  : string
Return target module name.
getTargetModuleModel()  : Vtiger_Module_Model
Return target module model.
getTitle()  : mixed
Function to get the Title of the widget.
getTotalCountURL()  : string
Get total count URL.
getTranslatedTitle()  : string
Function to get the translated title.
getUrl()  : string
Function to get the url of the widget.
getWidth()  : mixed
has()  : bool
Function to check if the key exists.
isCreatable()  : bool
Check if the widget is creatable.
isDefault()  : bool
Function to check the Widget is Default widget or not.
isDeletable()  : bool
Check if the widget is removable.
isEmpty()  : bool
Function to check if the key is empty.
isViewable()  : bool
Check if the widget is viewable.
processWidget()  : mixed
Process the UI Widget requested.
remove()  : mixed
Function to remove the value.
removeWidgetFromList()  : mixed
Remove widget from list in dashboard. Removing is possible only for widgets from filters.
save()  : bool
Function to save.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setDataFromRequest()  : mixed
Sets data from request.
setFilterId()  : mixed
Set filter id to show.
setModulesName()  : mixed
Set actual module name.
setWidgetModel()  : mixed
Set widget model to show.
show()  : mixed
Function to show a widget from the Users Dashboard.
updateWidgetPosition()  : mixed
updateWidgetSize()  : mixed
Update widget size.
initListViewController()  : mixed
{@inheritdoc}

Constants

DEFAULT_LABELS

public array<string|int, mixed> DEFAULT_LABELS = ['Activities' => 'LBL_ACTIVITIES', 'DetailView' => 'LBL_RECORD_DETAILS', 'GeneralInfo' => 'LBL_RECORD_SUMMARY']

Default labels

SHOW_COMULNS

Set numer of shown columns in list.

public array<string|int, mixed> SHOW_COMULNS = 4

Properties

$customFields

public array<string|int, mixed> $customFields = []

Custom fields for edit

$editFields

public array<string|int, mixed> $editFields = ['isdefault' => ['label' => 'LBL_MANDATORY_WIDGET', 'purifyType' => \App\Purifier::BOOL], 'cache' => ['label' => 'LBL_CACHE_WIDGET', 'purifyType' => \App\Purifier::BOOL], 'width' => ['label' => 'LBL_WIDTH', 'purifyType' => \App\Purifier::INTEGER], 'height' => ['label' => 'LBL_HEIGHT', 'purifyType' => \App\Purifier::INTEGER]]

Fields for edit

$extraData

Extra data.

protected array<string|int, mixed> $extraData

$listviewHeaders

List of view headers.

protected array<string|int, mixed> $listviewHeaders

$listViewModel

ListView model.

protected Vtiger_ListView_Model $listViewModel

$listviewRecords

List of view records.

protected array<string|int, mixed> $listviewRecords

$modulesName

Module name.

protected string $modulesName

$searchParams

Search condition.

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

$targetModuleModel

Target module model.

protected Vtiger_Module_Model $targetModuleModel

$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

clearDeviceConf()

Clear configuration of widgets for this device.

public static clearDeviceConf(int $dashboardId) : void
Parameters
$dashboardId : int
Return values
void

delete()

Remove widget template.

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>

getDashboardId()

Get dashboard id.

public static getDashboardId(Request $request) : int
Parameters
$request : Request
Return values
int

getData()

Function to get all the values of the Object.

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

getDataValue()

Gets value from data column.

public getDataValue(string $name) : mixed
Parameters
$name : string
Return values
mixed

getDeleteUrl()

Function returns URL that will remove a widget for a User.

public getDeleteUrl() : string
Return values
string

getEditFields()

Gets fields for edit view.

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

getFieldInstanceByName()

Gets field instance by name.

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

getFilterId()

Return filter id.

public getFilterId() : int
Return values
int

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

getHeaderCount()

Return header count.

public getHeaderCount() : int
Return values
int

getHeaders()

Get columns name.

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

getHeight()

public getHeight() : mixed
Return values
mixed

getId()

Get ID.

public getId() : int
Return values
int

getInstance()

public static getInstance(mixed $linkId, mixed $userId) : mixed
Parameters
$linkId : mixed
$userId : mixed
Return values
mixed

getInstanceFromValues()

Function to get the instance of Vtiger Widget Model from the given array of key-value mapping.

public static getInstanceFromValues(array<string|int, mixed> $valueMap) : Vtiger_Widget_Model
Parameters
$valueMap : array<string|int, mixed>
Return values
Vtiger_Widget_Model

instance

getInstanceWithTemplateId()

public static getInstanceWithTemplateId(int $widgetId) : mixed
Parameters
$widgetId : int
Return values
mixed

getInstanceWithWidgetId()

Get widget instance by id.

public static getInstanceWithWidgetId(int $widgetId, int $userId) : self
Parameters
$widgetId : int
$userId : int
Return values
self

getKeys()

Function to get keys.

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

getListViewURL()

Get list view URL.

public getListViewURL() : string
Return values
string

getName()

public getName() : mixed
Return values
mixed

getPosition()

Function to get the position of the widget.

public getPosition(int $position, string $coordinate) : int
Parameters
$position : int
$coordinate : string
Tags
throws
AppException
Return values
int

getRecordLimit()

Return record limit.

public getRecordLimit() : int
Return values
int

getRecords()

Return records list.

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

Function to get the Quick Links in settings view.

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

List of Vtiger_Link_Model instances

getTargetModule()

Return target module name.

public getTargetModule() : string
Return values
string

getTargetModuleModel()

Return target module model.

public getTargetModuleModel() : Vtiger_Module_Model
Return values
Vtiger_Module_Model

getTitle()

Function to get the Title of the widget.

public getTitle() : mixed
Return values
mixed

getTotalCountURL()

Get total count URL.

public getTotalCountURL() : string
Return values
string

getTranslatedTitle()

Function to get the translated title.

public getTranslatedTitle() : string
Return values
string

getUrl()

Function to get the url of the widget.

public getUrl() : string
Return values
string

getWidth()

public getWidth() : mixed
Return values
mixed

has()

Function to check if the key exists.

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

isCreatable()

Check if the widget is creatable.

public isCreatable() : bool
Return values
bool

isDefault()

Function to check the Widget is Default widget or not.

public isDefault() : bool
Return values
bool

isDeletable()

Check if the widget is removable.

public isDeletable() : bool
Return values
bool

isEmpty()

Function to check if the key is empty.

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

isViewable()

Check if the widget is viewable.

public isViewable() : bool
Return values
bool

processWidget()

Process the UI Widget requested.

public processWidget(Vtiger_Link_Model $widgetLink, Vtiger_Record_Model $recordModel) : mixed
Parameters
$widgetLink : Vtiger_Link_Model
$recordModel : Vtiger_Record_Model
Return values
mixed

remove()

Function to remove the value.

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

removeWidgetFromList()

Remove widget from list in dashboard. Removing is possible only for widgets from filters.

public static removeWidgetFromList(int $id) : mixed
Parameters
$id : int
Return values
mixed

save()

Function to save.

public save() : bool
Return values
bool

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

setDataFromRequest()

Sets data from request.

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

setFilterId()

Set filter id to show.

public setFilterId( $filterId) : mixed
Parameters
$filterId :
Return values
mixed

setModulesName()

Set actual module name.

public setModulesName( $modulesName) : mixed
Parameters
$modulesName :
Return values
mixed

setWidgetModel()

Set widget model to show.

public setWidgetModel( $widgetModel) : mixed
Parameters
$widgetModel :
Tags
throws
AppException
Return values
mixed

show()

Function to show a widget from the Users Dashboard.

public show() : mixed
Return values
mixed

updateWidgetPosition()

public static updateWidgetPosition(mixed $position, mixed $linkId, mixed $widgetId, mixed $userId) : mixed
Parameters
$position : mixed
$linkId : mixed
$widgetId : mixed
$userId : mixed
Return values
mixed

updateWidgetSize()

Update widget size.

public static updateWidgetSize(string $size, int $linkId, int $widgetId, int $userId) : mixed
Parameters
$size : string
$linkId : int
$widgetId : int
$userId : int
Return values
mixed

initListViewController()

{@inheritdoc}

protected initListViewController() : mixed
Return values
mixed

        

Search results