Bitrix API

Form extends JsonController

Class Form

Table of Contents

Constants

ERROR_REQUIRED_PARAMETER  = 'MAIN_CONTROLLER_22001'
ERROR_UNKNOWN_ACTION  = 'MAIN_CONTROLLER_22002'
EVENT_ON_AFTER_ACTION  = 'onAfterAction'
EVENT_ON_BEFORE_ACTION  = 'onBeforeAction'
EXCEPTION_UNKNOWN_ACTION  = 22002
SCOPE_AJAX  = 'ajax'
SCOPE_CLI  = 'cli'
SCOPE_REST  = 'rest'

Methods

__construct()  : mixed
Constructor Controller.
activateAction()  : bool
Activate form action.
activateListAction()  : void
Activate list of forms action.
assignOpenlinesToFormAction()  : mixed
assignWidgetToFormAction()  : mixed
checkAction()  : array<string|int, mixed>
Check form action.
className()  : string
Returns the fully qualified name of this class.
configureActions()  : array<string|int, mixed>
convertKeysToCamelCase()  : array<string|int, mixed>|mixed|string
Converts keys of array to camel case notation.
copyAction()  : bool
Copy form action.
deleteAction()  : bool
Delete form action.
finalizeResponse()  : void
Finalizes response.
forward()  : HttpResponse|mixed
generateActionMethodName()  : string
getAction()  : array<string|int, mixed>
Get form action.
getActionUri()  : Uri
Returns uri for ajax end point for the action name. It's a helper, which uses relative action name without controller name.
getAutoWiredParameters()  : array<string|int, Parameter>
getCaptchaAction()  : array<string|int, mixed>
Get captcha action.
getConfigurationOfActions()  : array<string|int, mixed>|null
getCurrentUser()  : CurrentUser
getDefaultAutoWiredParameters()  : array<string|int, Parameter>
getDictAction()  : array<string|int, mixed>
Get dict.
getEmbedAction()  : array<string|int, mixed>
getErrorByCode()  : Error
Getting once error with the necessary code.
getErrors()  : array<string|int, Error>
Getting array of errors.
getFileLimitAction()  : array<string|int, mixed>
getFullEventName()  : string
getModuleId()  : string
Returns module id.
getOpenlinesForEmbedAction()  : mixed
getPrimaryAutoWiredParameter()  : Parameter|null
getRequest()  : HttpRequest
getScope()  : string
getSourceParametersList()  : array<string|int, mixed>
getUnsignedParameters()  : mixed
getWidgetsForEmbedAction()  : array<string|int, mixed>
isLocatedUnderPsr4()  : bool
listAction()  : array<string|int, mixed>|null
List forms action.
listNameActions()  : array<string|int, mixed>
Returns list of all
prepareAction()  : array<string|int, mixed>
Prepare form action.
redirectTo()  : Redirect
Redirect to URL.
resetCountersAction()  : bool
Reset all the statistic counters in counters column.
run()  : HttpResponse|mixed
saveAction()  : array<string|int, mixed>
Save form action.
saveEmbedAction()  : mixed
setCaptchaAction()  : array<string|int, mixed>
Set captcha action.
setCurrentUser()  : void
setEditorAction()  : void
Set editor ID action.
setFileLimitAction()  : array<string|int, mixed>
setScope()  : Controller
setSourceParametersList()  : Controller

Constants

ERROR_REQUIRED_PARAMETER

public mixed ERROR_REQUIRED_PARAMETER = 'MAIN_CONTROLLER_22001'

ERROR_UNKNOWN_ACTION

public mixed ERROR_UNKNOWN_ACTION = 'MAIN_CONTROLLER_22002'

EVENT_ON_AFTER_ACTION

public mixed EVENT_ON_AFTER_ACTION = 'onAfterAction'

EVENT_ON_BEFORE_ACTION

public mixed EVENT_ON_BEFORE_ACTION = 'onBeforeAction'

EXCEPTION_UNKNOWN_ACTION

public mixed EXCEPTION_UNKNOWN_ACTION = 22002

Methods

__construct()

Constructor Controller.

public __construct([Request|null $request = null ]) : mixed
Parameters
$request : Request|null = null

activateAction()

Activate form action.

public activateAction(int $id, bool $mode) : bool
Parameters
$id : int

Form ID.

$mode : bool

Mode.

Return values
bool

activateListAction()

Activate list of forms action.

public activateListAction(array<string|int, mixed> $list[, bool $mode = true ]) : void
Parameters
$list : array<string|int, mixed>

ID list.

$mode : bool = true

Mode.

assignOpenlinesToFormAction()

public assignOpenlinesToFormAction(int $formId, int $lineId, string $assigned[, string $afterMessage = 'N' ]) : mixed
Parameters
$formId : int
$lineId : int
$assigned : string
$afterMessage : string = 'N'

assignWidgetToFormAction()

public assignWidgetToFormAction(int $formId, int $buttonId, string $assigned) : mixed
Parameters
$formId : int
$buttonId : int
$assigned : string

checkAction()

Check form action.

public checkAction(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed>

Options.

Return values
array<string|int, mixed>

className()

Returns the fully qualified name of this class.

public final static className() : string
Return values
string

configureActions()

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

convertKeysToCamelCase()

Converts keys of array to camel case notation.

public convertKeysToCamelCase(mixed $data) : array<string|int, mixed>|mixed|string
Parameters
$data : mixed

Data.

Tags
see
Converter::OUTPUT_JSON_FORMAT
Return values
array<string|int, mixed>|mixed|string

copyAction()

Copy form action.

public copyAction(int $id) : bool
Parameters
$id : int

Form ID.

Return values
bool

deleteAction()

Delete form action.

public deleteAction(int $id) : bool
Parameters
$id : int

Form ID.

Return values
bool

finalizeResponse()

Finalizes response.

public finalizeResponse(Response $response) : void

The method will be invoked when HttpApplication will be ready to send response to client. It's a final place where Controller can interact with response.

Parameters
$response : Response

forward()

public forward(Controller|string $controller, string $actionName[, array<string|int, mixed>|null $parameters = null ]) : HttpResponse|mixed
Parameters
$controller : Controller|string
$actionName : string
$parameters : array<string|int, mixed>|null = null
Tags
throws
SystemException
Return values
HttpResponse|mixed

generateActionMethodName()

public final generateActionMethodName(mixed $action) : string
Parameters
$action : mixed
Return values
string

getAction()

Get form action.

public getAction(int $id) : array<string|int, mixed>
Parameters
$id : int

Form ID.

Return values
array<string|int, mixed>

getActionUri()

Returns uri for ajax end point for the action name. It's a helper, which uses relative action name without controller name.

public final getActionUri(string $actionName[, array<string|int, mixed> $params = [] ][, bool $absolute = false ]) : Uri
Parameters
$actionName : string

Action name. It's a relative action name without controller name.

$params : array<string|int, mixed> = []

Parameters for creating uri.

$absolute : bool = false
Return values
Uri

getCaptchaAction()

Get captcha action.

public getCaptchaAction() : array<string|int, mixed>
Tags
throws
AccessDeniedException
Return values
array<string|int, mixed>

getConfigurationOfActions()

public final getConfigurationOfActions() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getDefaultAutoWiredParameters()

public final getDefaultAutoWiredParameters() : array<string|int, Parameter>
Return values
array<string|int, Parameter>

getDictAction()

Get dict.

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

getEmbedAction()

public getEmbedAction(int $formId) : array<string|int, mixed>
Parameters
$formId : int
Tags
throws
AccessDeniedException
Return values
array<string|int, mixed>

getErrorByCode()

Getting once error with the necessary code.

public final getErrorByCode(string $code) : Error
Parameters
$code : string

Code of error.

Return values
Error

getErrors()

Getting array of errors.

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

getFileLimitAction()

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

getFullEventName()

public final static getFullEventName(mixed $eventName) : string
Parameters
$eventName : mixed
Return values
string

getModuleId()

Returns module id.

public final getModuleId() : string

Tries to guess module id by file path and function @see getModuleId().

Return values
string

getOpenlinesForEmbedAction()

public getOpenlinesForEmbedAction(int $formId[, int $count = self::EMBED_DEFAULT_OPENLINES_DISPLAY_COUNT ]) : mixed
Parameters
$formId : int
$count : int = self::EMBED_DEFAULT_OPENLINES_DISPLAY_COUNT

getRequest()

public final getRequest() : HttpRequest
Return values
HttpRequest

getScope()

public final getScope() : string
Return values
string

getSourceParametersList()

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

getUnsignedParameters()

public final getUnsignedParameters() : mixed

getWidgetsForEmbedAction()

public getWidgetsForEmbedAction(int $formId[, int $count = self::EMBED_DEFAULT_WIDGETS_DISPLAY_COUNT ]) : array<string|int, mixed>
Parameters
$formId : int
$count : int = self::EMBED_DEFAULT_WIDGETS_DISPLAY_COUNT
Tags
throws
AccessDeniedException
Return values
array<string|int, mixed>

isLocatedUnderPsr4()

public final isLocatedUnderPsr4() : bool
Return values
bool

listAction()

List forms action.

public listAction([array<string|int, mixed> $filter = ['active' => true] ]) : array<string|int, mixed>|null
Parameters
$filter : array<string|int, mixed> = ['active' => true]

Filter.

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

listNameActions()

Returns list of all

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

prepareAction()

Prepare form action.

public prepareAction(array<string|int, mixed> $options, array<string|int, mixed> $preparing) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed>

Options.

$preparing : array<string|int, mixed>

Preparing data.

Return values
array<string|int, mixed>

resetCountersAction()

Reset all the statistic counters in counters column.

public resetCountersAction(mixed $id) : bool
Parameters
$id : mixed
Tags
throws
AccessDeniedException
Return values
bool

run()

public final run(mixed $actionName, array<string|int, mixed> $sourceParametersList) : HttpResponse|mixed
Parameters
$actionName : mixed
$sourceParametersList : array<string|int, mixed>
Tags
throws
SystemException
Return values
HttpResponse|mixed

saveAction()

Save form action.

public saveAction(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed>

Options.

Return values
array<string|int, mixed>

saveEmbedAction()

public saveEmbedAction(int $formId, array<string|int, mixed> $data) : mixed
Parameters
$formId : int
$data : array<string|int, mixed>

setCaptchaAction()

Set captcha action.

public setCaptchaAction(string $key, string $secret) : array<string|int, mixed>
Parameters
$key : string

Key.

$secret : string

Secret.

Tags
throws
AccessDeniedException
Return values
array<string|int, mixed>

setEditorAction()

Set editor ID action.

public setEditorAction(int $editorId) : void
Parameters
$editorId : int

Editor ID.

setFileLimitAction()

public setFileLimitAction(int|null $limitMb) : array<string|int, mixed>
Parameters
$limitMb : int|null
Return values
array<string|int, mixed>

setSourceParametersList()

public final setSourceParametersList(array<string|int, mixed> $sourceParametersList) : Controller
Parameters
$sourceParametersList : array<string|int, mixed>
Return values
Controller

        
On this page

Search results