Bitrix API

Manager

Table of Contents

Methods

__construct()  : mixed
clearHistoryByContext()  : void
Removes all History by Context.
deleteForUser()  : void
Finally removes all records for the user.
getCapacity()  : int
Returns capacity of history per user-context.
getFakeItem()  : Item
Returns fake History Item (use when history doesn't exist for current user).
getLastItem()  : array<string|int, mixed>|null
Returns last history item for current context.
readHistory()  : Collection
Returns collection of history Items.
shouldAlwaysWrite()  : bool
Returns true, if in module settings enabled corresponding option.
shouldDisableHistoryForUser()  : bool
Returns true if history will not be saved for current user.
writeHistory()  : bool
Writes history for Engine's work result.

Methods

clearHistoryByContext()

Removes all History by Context.

public static clearHistoryByContext(array<string|int, mixed>|string $context) : void
Parameters
$context : array<string|int, mixed>|string

Specified context.

deleteForUser()

Finally removes all records for the user.

public static deleteForUser(int $userId) : void
Parameters
$userId : int

User id.

getCapacity()

Returns capacity of history per user-context.

public static getCapacity() : int
Return values
int

getFakeItem()

Returns fake History Item (use when history doesn't exist for current user).

public static getFakeItem(string|null $data, IEngine|Engine $engine) : Item
Parameters
$data : string|null

Data.

$engine : IEngine|Engine

Engine instance.

Return values
Item

getLastItem()

Returns last history item for current context.

public static getLastItem(Context $context) : array<string|int, mixed>|null
Parameters
$context : Context

Context instance.

Return values
array<string|int, mixed>|null

readHistory()

Returns collection of history Items.

public static readHistory(Context $context[, int|null $limit = 0 ]) : Collection
Parameters
$context : Context

History context.

$limit : int|null = 0

Limit of records.

Return values
Collection

shouldAlwaysWrite()

Returns true, if in module settings enabled corresponding option.

public static shouldAlwaysWrite() : bool
Return values
bool

shouldDisableHistoryForUser()

Returns true if history will not be saved for current user.

public static shouldDisableHistoryForUser(int $userId) : bool
Parameters
$userId : int
Return values
bool

writeHistory()

Writes history for Engine's work result.

public writeHistory(Result $result) : bool
Parameters
$result : Result

Result data.

Return values
bool

        
On this page

Search results