Bitrix API

Controller

AbstractYes

Table of Contents

Constants

ERROR_REQUIRED_PARAMETER  = 'VOTE_CONTROLLER_22001'
ERROR_UNKNOWN_ACTION  = 'VOTE_CONTROLLER_22002'
EVENT_ON_BEFORE_ACTION  = 'onBeforeAction'
STATUS_DENIED  = 'denied'
STATUS_ERROR  = 'error'
STATUS_NEED_AUTH  = 'need_auth'
STATUS_SUCCESS  = 'success'

Methods

__construct()  : mixed
Constructor Controller.
exec()  : void
Executes controller by specific action.
getAction()  : string
Gets current action.
getActionDescription()  : array<string|int, mixed>
Gets description of action.
getErrorByCode()  : Error|null
Getting once error with the necessary code.
getErrors()  : array<string|int, Error>
Getting array of errors.
setAction()  : $this
Sets action and description.
setActionName()  : $this
Sets action name.

Constants

ERROR_REQUIRED_PARAMETER

public mixed ERROR_REQUIRED_PARAMETER = 'VOTE_CONTROLLER_22001'

ERROR_UNKNOWN_ACTION

public mixed ERROR_UNKNOWN_ACTION = 'VOTE_CONTROLLER_22002'

EVENT_ON_BEFORE_ACTION

public mixed EVENT_ON_BEFORE_ACTION = 'onBeforeAction'

STATUS_DENIED

public mixed STATUS_DENIED = 'denied'

STATUS_ERROR

public mixed STATUS_ERROR = 'error'

STATUS_NEED_AUTH

public mixed STATUS_NEED_AUTH = 'need_auth'

STATUS_SUCCESS

public mixed STATUS_SUCCESS = 'success'

Methods

__construct()

Constructor Controller.

public __construct() : mixed

exec()

Executes controller by specific action.

public exec() : void

This method contains all steps of life cycle controller.

getAction()

Gets current action.

public getAction() : string
Return values
string

getActionDescription()

Gets description of action.

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

getErrorByCode()

Getting once error with the necessary code.

public getErrorByCode(string $code) : Error|null
Parameters
$code : string

Code of error.

Return values
Error|null

getErrors()

Getting array of errors.

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

setAction()

Sets action and description.

public setAction(string $action, array<string|int, mixed> $description) : $this
Parameters
$action : string

Action name.

$description : array<string|int, mixed>

Action description.

Return values
$this

setActionName()

Sets action name.

public setActionName(string $action) : $this
Parameters
$action : string

Action name.

Return values
$this

        
On this page

Search results