Block extends Stepper
Class Stepper
Table of Contents
Constants
- CONTINUE_EXECUTION = true
- DELAY_COEFFICIENT = 0.5
- FINISH_EXECUTION = false
- STEPPER_COUNT = 1
- Items count for one step.
- THRESHOLD_TIME = 20.0
Methods
- __destruct() : mixed
- bind() : void
- Adds agent for current class.
- bindClass() : void
- Adds agent for class $className for $moduleId module. Example for updater: \Bitrix\Main\Stepper::bindClass('\Bitrix\SomeModule\SomeClass', 'somemodule').
- checkRequest() : void
- Just method to check request.
- createInstance() : Stepper
- Just a fabric method.
- execAgent() : string
- Executes an agent.
- execute() : bool
- One step of stepper.
- executeStep() : int
- Execute one step.
- getHtml() : string
- Returns HTML to show updates.
- getModuleId() : string
- Wrap-function to get moduleId.
- getOuterParams() : array<string|int, mixed>
- getTitle() : mixed
- makeArguments() : string
- It is possible to pass only integer and string values for now. But you can make your own method or extend this one.
- register() : void
- Register new block for stepper update.
- setOuterParams() : void
- unregister() : void
- Unregister block for stepper update.
Constants
CONTINUE_EXECUTION
public
mixed
CONTINUE_EXECUTION
= true
DELAY_COEFFICIENT
public
mixed
DELAY_COEFFICIENT
= 0.5
FINISH_EXECUTION
public
mixed
FINISH_EXECUTION
= false
STEPPER_COUNT
Items count for one step.
public
mixed
STEPPER_COUNT
= 1
THRESHOLD_TIME
public
mixed
THRESHOLD_TIME
= 20.0
Methods
__destruct()
public
__destruct() : mixed
Does nothing.
bind()
Adds agent for current class.
public
static bind([int $delay = 300 ][, array<string|int, mixed> $withArguments = [] ]) : void
Parameters
- $delay : int = 300
-
Delay for running agent
- $withArguments : array<string|int, mixed> = []
-
Data that will available in $stepper->outerParams
bindClass()
Adds agent for class $className for $moduleId module. Example for updater: \Bitrix\Main\Stepper::bindClass('\Bitrix\SomeModule\SomeClass', 'somemodule').
public
static bindClass(string $className, string $moduleId[, int $delay = 300 ][, array<string|int, mixed> $withArguments = [] ]) : void
Parameters
- $className : string
-
Class like \Bitrix\SomeModule\SomeClass extends Stepper.
- $moduleId : string
-
Module ID like somemodule.
- $delay : int = 300
-
Delay for running agent
- $withArguments : array<string|int, mixed> = []
checkRequest()
Just method to check request.
public
static checkRequest() : void
createInstance()
Just a fabric method.
public
static createInstance() : Stepper
Return values
StepperexecAgent()
Executes an agent.
public
static execAgent() : string
Return values
stringexecute()
One step of stepper.
public
execute(array<string|int, mixed> &$result) : bool
Parameters
- $result : array<string|int, mixed>
-
Result array.
Return values
boolexecuteStep()
Execute one step.
public
static executeStep(array<string|int, mixed> $filter[, int &$count = 0 ][, int $limit = 0 ][, array<string|int, mixed> $params = [] ]) : int
Parameters
- $filter : array<string|int, mixed>
-
Filter for step.
- $count : int = 0
-
Updated count.
- $limit : int = 0
-
Select limit.
- $params : array<string|int, mixed> = []
-
Additional params.
Return values
int —Last updated id.
getHtml()
Returns HTML to show updates.
public
static getHtml([array<string|int, mixed>|string $ids = [] ][, string $title = "" ]) : string
Parameters
- $ids : array<string|int, mixed>|string = []
- $title : string = ""
Return values
stringgetModuleId()
Wrap-function to get moduleId.
public
static getModuleId() : string
Return values
stringgetOuterParams()
public
getOuterParams() : array<string|int, mixed>
Return values
array<string|int, mixed>getTitle()
public
static getTitle() : mixed
makeArguments()
It is possible to pass only integer and string values for now. But you can make your own method or extend this one.
public
static makeArguments([array<string|int, mixed> $arguments = [] ]) : string
Parameters
- $arguments : array<string|int, mixed> = []
Return values
stringregister()
Register new block for stepper update.
public
static register(string|array<string|int, string> $codes[, array<string|int, mixed> $params = [] ]) : void
Parameters
- $codes : string|array<string|int, string>
-
Block codes.
- $params : array<string|int, mixed> = []
-
Additional params.
setOuterParams()
public
setOuterParams(array<string|int, mixed> $outerParams) : void
Parameters
- $outerParams : array<string|int, mixed>
unregister()
Unregister block for stepper update.
public
static unregister(array<string|int, string> $codes) : void
Parameters
- $codes : array<string|int, string>
-
Block codes.