CustomView
in package
Custom view class.
Table of Contents
- CV_STATUS_DEFAULT = 0
- CV_STATUS_PENDING = 2
- CV_STATUS_PRIVATE = 1
- CV_STATUS_PUBLIC = 3
- CV_STATUS_SYSTEM = 4
- $defaultViewId : mixed
- $module : Vtiger_Module_Model
- $moduleName : mixed
- $user : mixed
- clearCacheById() : void
- Function clear cache by custom view ID.
- getColumnsListByCvid() : array<string|int, mixed>
- Columns list by cvid.
- getConditions() : array<string|int, mixed>
- Returns conditions for filter.
- getCurrentPage() : int
- Get current page.
- getCurrentView() : int|string
- Function that reads current module filter.
- getCustomView() : mixed
- Get custom view from file.
- getCustomViewById() : array<string|int, mixed>
- Get custom view by ID.
- getCVDetails() : array<string|int, mixed>
- Gets custom view details by ID.
- getDateFilterTypes() : array<string|int, mixed>
- Function to get all the date filter type informations.
- getDefaultCvId() : int|string
- Get default cvId.
- getDuplicateFields() : array<string|int, mixed>
- Get fields to detect duplicates.
- getFilterInfo() : array<string|int, mixed>
- Function to get basic information about filter.
- getFilters() : array<string|int, mixed>
- Function to get basic information about all filters.
- getFiltersByModule() : array<string|int, mixed>
- Function to get basic information about all filters for module.
- getInstance() : self
- Static Function to get the Instance of CustomView.
- getMandatoryFilter() : array<string|int, mixed>|int
- Get mandatory filter by module.
- getModule() : false|Vtiger_Module_Model
- Gets module object.
- getModuleFiltersByMenuId() : array<string|int, mixed>
- Get module filters by menu id.
- getSortBy() : string
- Get sorted by.
- getViewId() : int|string
- To get the customViewId of the specified module.
- getViewIdByName() : int|null
- Get viewId by name.
- hasViewChanged() : bool
- Has view changed.
- isMultiViewId() : bool
- Do we have multiple ids.
- isPermitted() : bool
- Check permissions.
- isPermittedCustomView() : bool
- Function to check if the current user is able to see the customView.
- resetCurrentView() : mixed
- Reset current views configuration in session.
- setCurrentPage() : mixed
- Set current page.
- setCurrentView() : mixed
- Function that sets the module filter in session.
- setSortBy() : mixed
- Set sorted by.
- getColumnsByCvidFromDb() : array<string|int, mixed>
- Columns list by cvid.
- getCustomViewFromFile() : mixed
- Get custom view from file.
- sortConditions() : array<string|int, mixed>|null
- Sorting conditions.
Constants
CV_STATUS_DEFAULT
public
mixed
CV_STATUS_DEFAULT
= 0
CV_STATUS_PENDING
public
mixed
CV_STATUS_PENDING
= 2
CV_STATUS_PRIVATE
public
mixed
CV_STATUS_PRIVATE
= 1
CV_STATUS_PUBLIC
public
mixed
CV_STATUS_PUBLIC
= 3
CV_STATUS_SYSTEM
public
mixed
CV_STATUS_SYSTEM
= 4
Properties
$defaultViewId
private
mixed
$defaultViewId
$module
private
Vtiger_Module_Model
$module
$moduleName
private
mixed
$moduleName
$user
private
mixed
$user
Methods
clearCacheById()
Function clear cache by custom view ID.
public
static clearCacheById(int $cvId[, string|null $moduleName = null ]) : void
Parameters
- $cvId : int
- $moduleName : string|null = null
Return values
void —getColumnsListByCvid()
Columns list by cvid.
public
getColumnsListByCvid(mixed $cvIds) : array<string|int, mixed>
Parameters
- $cvIds : mixed
-
(comma separated)
Tags
Return values
array<string|int, mixed> —getConditions()
Returns conditions for filter.
public
static getConditions(int|string $id) : array<string|int, mixed>
Parameters
- $id : int|string
Return values
array<string|int, mixed> —[ 'condition' => "AND" or "OR" 'rules' => [[ 'fieldname' => name of fields 'operator' => operator, for instance: 'e' 'value' => values ]] ]
getCurrentPage()
Get current page.
public
static getCurrentPage(string $moduleName, int|string $viewId) : int
Parameters
- $moduleName : string
- $viewId : int|string
Return values
int —getCurrentView()
Function that reads current module filter.
public
static getCurrentView(string $moduleName) : int|string
Parameters
- $moduleName : string
-
- module name
Return values
int|string —getCustomView()
Get custom view from file.
public
getCustomView(string $cvIds) : mixed
Parameters
- $cvIds : string
-
(comma separated multi cdIds)
Tags
Return values
mixed —getCustomViewById()
Get custom view by ID.
public
static getCustomViewById(int $cvId) : array<string|int, mixed>
Parameters
- $cvId : int
Return values
array<string|int, mixed> —getCVDetails()
Gets custom view details by ID.
public
static getCVDetails(int $cvId[, string|null $moduleName = null ]) : array<string|int, mixed>
Parameters
- $cvId : int
- $moduleName : string|null = null
Return values
array<string|int, mixed> —getDateFilterTypes()
Function to get all the date filter type informations.
public
static getDateFilterTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —getDefaultCvId()
Get default cvId.
public
getDefaultCvId() : int|string
Return values
int|string —getDuplicateFields()
Get fields to detect duplicates.
public
static getDuplicateFields(int|string $viewId) : array<string|int, mixed>
Parameters
- $viewId : int|string
Return values
array<string|int, mixed> —getFilterInfo()
Function to get basic information about filter.
public
getFilterInfo(int $cvId) : array<string|int, mixed>
Parameters
- $cvId : int
Return values
array<string|int, mixed> —getFilters()
Function to get basic information about all filters.
public
getFilters() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFiltersByModule()
Function to get basic information about all filters for module.
public
static getFiltersByModule(string $moduleName) : array<string|int, mixed>
Parameters
- $moduleName : string
Return values
array<string|int, mixed> —getInstance()
Static Function to get the Instance of CustomView.
public
static getInstance(string $moduleName[, mixed $userModelOrId = false ]) : self
Parameters
- $moduleName : string
- $userModelOrId : mixed = false
Return values
self —getMandatoryFilter()
Get mandatory filter by module.
public
getMandatoryFilter([bolean $returnData = false ]) : array<string|int, mixed>|int
Parameters
- $returnData : bolean = false
Return values
array<string|int, mixed>|int —getModule()
Gets module object.
public
getModule() : false|Vtiger_Module_Model
Return values
false|Vtiger_Module_Model —getModuleFiltersByMenuId()
Get module filters by menu id.
public
static getModuleFiltersByMenuId(int $menuId[, string $moduleName = '' ]) : array<string|int, mixed>
Parameters
- $menuId : int
- $moduleName : string = ''
Return values
array<string|int, mixed> —getSortBy()
Get sorted by.
public
static getSortBy(string $moduleName) : string
Parameters
- $moduleName : string
Return values
string —getViewId()
To get the customViewId of the specified module.
public
getViewId([mixed $noCache = false ]) : int|string
Parameters
- $noCache : mixed = false
Return values
int|string —getViewIdByName()
Get viewId by name.
public
getViewIdByName(string $viewName) : int|null
Parameters
- $viewName : string
Return values
int|null —hasViewChanged()
Has view changed.
public
static hasViewChanged(string $moduleName[, int|string $viewId = false ]) : bool
Parameters
- $moduleName : string
- $viewId : int|string = false
Return values
bool —isMultiViewId()
Do we have multiple ids.
public
static isMultiViewId(string $cvId) : bool
Parameters
- $cvId : string
-
(comma separated id list or one id)
Return values
bool —isPermitted()
Check permissions.
public
static isPermitted(int $cvId[, string $moduleName = null ][, int $userId = null ]) : bool
Parameters
- $cvId : int
- $moduleName : string = null
- $userId : int = null
Return values
bool —isPermittedCustomView()
Function to check if the current user is able to see the customView.
public
isPermittedCustomView(int|string $viewId) : bool
Parameters
- $viewId : int|string
Return values
bool —resetCurrentView()
Reset current views configuration in session.
public
static resetCurrentView([string|bool $moduleName = false ]) : mixed
Parameters
- $moduleName : string|bool = false
Return values
mixed —setCurrentPage()
Set current page.
public
static setCurrentPage(string $moduleName, int|string $viewId, int $start) : mixed
Parameters
- $moduleName : string
- $viewId : int|string
- $start : int
Return values
mixed —setCurrentView()
Function that sets the module filter in session.
public
static setCurrentView(string $moduleName, int|string $viewId) : mixed
Parameters
- $moduleName : string
-
- module name
- $viewId : int|string
-
- filter id
Return values
mixed —setSortBy()
Set sorted by.
public
static setSortBy(string $moduleName, mixed $sortBy) : mixed
Parameters
- $moduleName : string
- $sortBy : mixed
Return values
mixed —getColumnsByCvidFromDb()
Columns list by cvid.
private
getColumnsByCvidFromDb(mixed $cvId) : array<string|int, mixed>
Parameters
- $cvId : mixed
Tags
Return values
array<string|int, mixed> —getCustomViewFromFile()
Get custom view from file.
private
getCustomViewFromFile(string $cvId) : mixed
Parameters
- $cvId : string
Tags
Return values
mixed —sortConditions()
Sorting conditions.
private
static sortConditions(array<string|int, mixed>|null $arrayToSort) : array<string|int, mixed>|null
Parameters
- $arrayToSort : array<string|int, mixed>|null