Documentation

Vtiger_Watchdog_Model extends Base
in package

Watching Model Class.

Tags
copyright

YetiForce S.A.

license

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

author

Mariusz Krzaczkowski m.krzaczkowski@yetiforce.com

author

Radosław Skrzypczak r.skrzypczak@yetiforce.com

Table of Contents

RECORD_ACTIVE  = 1
$noticeDefaultType  : mixed
$cache  : mixed
$cacheFile  : mixed
$value  : array<string|int, mixed>
$watchingUsers  : mixed
$isAcive  : mixed
__construct()  : mixed
Constructor.
changeModuleState()  : int|bool
Function to change the state of the observed module.
changeRecordState()  : int|bool
Function to change the state of the observed record.
exceptions()  : int
Function to change the exceptions of the module.
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.
getData()  : array<string|int, mixed>
Function to get all the values of the Object.
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).
getInstance()  : Vtiger_Watchdog_Model
Function to get the instance by module.
getInstanceById()  : Vtiger_Watchdog_Model
Function to get the instance by id.
getKeys()  : array<string|int, string>
Function to get keys.
getModuleUsers()  : array<string|int, mixed>
Function get users.
getSupportedModules()  : array<string|int, mixed>
Function get supported modules.
getWatchingExceptions()  : array<string|int, mixed>
Function get watching exceptions.
getWatchingMembers()  : array<string|int, mixed>
Function get watching members.
getWatchingModules()  : array<string|int, mixed>
Function get watching modules.
getWatchingModulesSchedule()  : array<string|int, mixed>
Function get watching modules by schedule.
getWatchingUsers()  : array<string|int, mixed>
Function get watching users.
has()  : bool
Function to check if the key exists.
isActive()  : bool
Function verifies if module is active.
isEmpty()  : bool
Function to check if the key is empty.
isLock()  : bool
Function verifies if module is locked.
isWatchingModule()  : bool
Function checks if module is watched.
isWatchingModuleConfig()  : bool
Function verifies if module is watching in database.
isWatchingRecord()  : bool
Function verifies if rekord is watching.
lock()  : int
Function to change the state of the locked module.
reloadCache()  : mixed
Update watchdog module permissions cache.
remove()  : mixed
Function to remove the value.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setSchedulerByUser()  : int
Function to set user's schedule.

Constants

RECORD_ACTIVE

public mixed RECORD_ACTIVE = 1

Properties

$noticeDefaultType

public mixed $noticeDefaultType = 'PLL_SYSTEM'

$cache

protected static mixed $cache = \false

$cacheFile

protected static mixed $cacheFile = 'user_privileges/watchdogModule.php'

$value

protected array<string|int, mixed> $value

Values

$watchingUsers

protected mixed $watchingUsers = \false

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
$values : array<string|int, mixed> = []
Return values
mixed

changeModuleState()

Function to change the state of the observed module.

public changeModuleState(int $state[, string $member = false ]) : int|bool
Parameters
$state : int
$member : string = false
Return values
int|bool

changeRecordState()

Function to change the state of the observed record.

public changeRecordState(int $state) : int|bool
Parameters
$state : int
Return values
int|bool

exceptions()

Function to change the exceptions of the module.

public exceptions(array<string|int, mixed>|string $exceptions, string $member) : int
Parameters
$exceptions : array<string|int, mixed>|string
$member : string
Return values
int

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>

getData()

Function to get all the values of the Object.

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

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

getInstance()

Function to get the instance by module.

public static getInstance(int|string $moduleName[, int $userId = false ]) : Vtiger_Watchdog_Model
Parameters
$moduleName : int|string
$userId : int = false
Return values
Vtiger_Watchdog_Model

getInstanceById()

Function to get the instance by id.

public static getInstanceById(int $record, int|string $moduleName[, int $userId = false ]) : Vtiger_Watchdog_Model
Parameters
$record : int
$moduleName : int|string
$userId : int = false
Return values
Vtiger_Watchdog_Model

getKeys()

Function to get keys.

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

getModuleUsers()

Function get users.

public getModuleUsers() : array<string|int, mixed>
Return values
array<string|int, mixed>
  • List of users

getSupportedModules()

Function get supported modules.

public static getSupportedModules() : array<string|int, mixed>
Return values
array<string|int, mixed>
  • List of modules

getWatchingExceptions()

Function get watching exceptions.

public getWatchingExceptions(string $member) : array<string|int, mixed>
Parameters
$member : string
Return values
array<string|int, mixed>
  • List of exceptions

getWatchingMembers()

Function get watching members.

public getWatchingMembers([bool $getData = false ]) : array<string|int, mixed>
Parameters
$getData : bool = false
Return values
array<string|int, mixed>
  • List of members

getWatchingModules()

Function get watching modules.

public static getWatchingModules([int $userId = false ]) : array<string|int, mixed>
Parameters
$userId : int = false
  • User ID
Return values
array<string|int, mixed>
  • List of modules

getWatchingModulesSchedule()

Function get watching modules by schedule.

public static getWatchingModulesSchedule([int $ownerId = false ][, mixed $isName = false ]) : array<string|int, mixed>
Parameters
$ownerId : int = false
  • User ID
$isName : mixed = false
Return values
array<string|int, mixed>
  • List of modules

getWatchingUsers()

Function get watching users.

public getWatchingUsers([array<string|int, mixed> $restrictUsers = [] ]) : array<string|int, mixed>
Parameters
$restrictUsers : array<string|int, mixed> = []
Return values
array<string|int, mixed>
  • List of users

has()

Function to check if the key exists.

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

isActive()

Function verifies if module is active.

public isActive() : bool
Return values
bool

isEmpty()

Function to check if the key is empty.

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

isLock()

Function verifies if module is locked.

public isLock([mixed $moduleId = false ]) : bool
Parameters
$moduleId : mixed = false
Return values
bool

isWatchingModule()

Function checks if module is watched.

public isWatchingModule() : bool
Return values
bool

isWatchingModuleConfig()

Function verifies if module is watching in database.

public isWatchingModuleConfig(mixed $member) : bool
Parameters
$member : mixed
Return values
bool

isWatchingRecord()

Function verifies if rekord is watching.

public isWatchingRecord() : bool
Return values
bool

lock()

Function to change the state of the locked module.

public lock(int $state, string $member) : int
Parameters
$state : int
$member : string
Return values
int

reloadCache()

Update watchdog module permissions cache.

public static reloadCache() : mixed
Return values
mixed

remove()

Function to remove the value.

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

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

setSchedulerByUser()

Function to set user's schedule.

public static setSchedulerByUser(array<string|int, mixed> $sendNotifications, int $frequency[, int $ownerId = false ]) : int
Parameters
$sendNotifications : array<string|int, mixed>
$frequency : int
$ownerId : int = false
Return values
int

        

Search results