EntityCounter extends CounterBase
Table of Contents
Methods
- __construct() : mixed
- calculateValue() : int
- Evaluate counter value
- decrease() : void
- externalizeExtras() : mixed
- getActivityFilterParam() : array<string|int, mixed>
- getBoolExtraParam() : bool
- getCode() : mixed
- getEntityListSqlExpression() : string|array<string|int, mixed>
- getEntityTypeID() : int
- getExtraParam() : mixed
- getExtras() : mixed
- getIntegerExtraParam() : int
- getTypeID() : int
- getTypeName() : int
- getUserID() : mixed
- getValue() : mixed
- increase() : void
- internalizeExtras() : mixed
- prepareCode() : mixed
- prepareCodes() : mixed
- prepareDetailsPageUrl() : string
- Get details page URL.
- prepareEntityListFilter() : array<string|int, mixed>
- prepareEntityQueries() : array<string|int, Query>
- Prepare queries for specified entity.
- reset() : mixed
- resetAllCrmCountersForAllUsers() : void
- resetByCode() : mixed
- resetByCodeForAll() : mixed
- resetExcludedByCode() : void
- synchronize() : mixed
- synchronizePostponed() : mixed
Methods
__construct()
public
__construct(int $entityTypeID, int $typeID[, int $userID = 0 ][, array<string|int, mixed>|null $extras = null ]) : mixed
Parameters
- $entityTypeID : int
-
Entity Type ID (see \CCrmOwnerType).
- $typeID : int
-
Type ID (see EntityCounterType).
- $userID : int = 0
-
User ID.
- $extras : array<string|int, mixed>|null = null
-
Additional Parameters.
Tags
calculateValue()
Evaluate counter value
public
calculateValue() : int
Return values
intdecrease()
public
decrease([int $decrement = 1 ]) : void
Parameters
- $decrement : int = 1
externalizeExtras()
public
static externalizeExtras(array<string|int, mixed> $extras, array<string|int, mixed> &$params) : mixed
Parameters
- $extras : array<string|int, mixed>
- $params : array<string|int, mixed>
getActivityFilterParam()
public
getActivityFilterParam([array<string|int, mixed> $params = null ]) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed> = null
Return values
array<string|int, mixed>getBoolExtraParam()
public
getBoolExtraParam(string $name[, bool $default = false ]) : bool
Parameters
- $name : string
- $default : bool = false
Return values
boolgetCode()
public
getCode() : mixed
getEntityListSqlExpression()
public
getEntityListSqlExpression([array<string|int, mixed> $params = [] ]) : string|array<string|int, mixed>
Parameters
- $params : array<string|int, mixed> = []
Return values
string|array<string|int, mixed>getEntityTypeID()
public
getEntityTypeID() : int
Return values
intgetExtraParam()
public
getExtraParam(mixed $name[, mixed $default = null ]) : mixed
Parameters
- $name : mixed
- $default : mixed = null
getExtras()
public
getExtras() : mixed
getIntegerExtraParam()
public
getIntegerExtraParam(string $name[, int $default = 0 ]) : int
Parameters
- $name : string
-
Extra Parameter Name.
- $default : int = 0
-
Default Value.
Return values
intgetTypeID()
public
getTypeID() : int
Return values
intgetTypeName()
public
getTypeName() : int
Return values
intgetUserID()
public
getUserID() : mixed
getValue()
public
getValue([mixed $recalculate = false ]) : mixed
Parameters
- $recalculate : mixed = false
increase()
public
increase([int $increment = 1 ]) : void
Parameters
- $increment : int = 1
internalizeExtras()
public
static internalizeExtras(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
prepareCode()
public
static prepareCode(mixed $entityTypeID, mixed $typeID[, array<string|int, mixed> $extras = null ]) : mixed
Parameters
- $entityTypeID : mixed
- $typeID : mixed
- $extras : array<string|int, mixed> = null
prepareCodes()
public
static prepareCodes(mixed $entityTypeID, mixed $typeIDs[, array<string|int, mixed> $extras = null ]) : mixed
Parameters
- $entityTypeID : mixed
- $typeIDs : mixed
- $extras : array<string|int, mixed> = null
prepareDetailsPageUrl()
Get details page URL.
public
prepareDetailsPageUrl([string $url = '' ]) : string
Parameters
- $url : string = ''
-
Base URL.
Return values
stringprepareEntityListFilter()
public
prepareEntityListFilter([array<string|int, mixed>|null $params = null ]) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>|null = null
-
List Params (MASTER_ALIAS, MASTER_IDENTITY and etc).
Return values
array<string|int, mixed>prepareEntityQueries()
Prepare queries for specified entity.
public
prepareEntityQueries(int $entityTypeID, int $entityCounterTypeID, array<string|int, mixed> $userIds[, array<string|int, mixed>|null $options = null ]) : array<string|int, Query>
Parameters
- $entityTypeID : int
-
Entity Type ID.
- $entityCounterTypeID : int
-
Entity Counter Type ID.
- $userIds : array<string|int, mixed>
-
Users id.
- $options : array<string|int, mixed>|null = null
-
Options.
Tags
Return values
array<string|int, Query>reset()
public
reset() : mixed
resetAllCrmCountersForAllUsers()
public
static resetAllCrmCountersForAllUsers() : void
resetByCode()
public
static resetByCode(mixed $code[, mixed $userID = 0 ]) : mixed
Parameters
- $code : mixed
- $userID : mixed = 0
resetByCodeForAll()
public
static resetByCodeForAll(mixed $code) : mixed
Parameters
- $code : mixed
resetExcludedByCode()
public
static resetExcludedByCode(string $code, int $userId) : void
Parameters
- $code : string
- $userId : int
synchronize()
public
synchronize() : mixed
synchronizePostponed()
public
synchronizePostponed() : mixed