|
| init () |
| getFilePath () |
| processUnsignedParameters () |
| getSaltToUnsign () |
| getActionResponse (Action $action) |
| writeToLogException (\Throwable $e) |
| collectDebugInfo () |
| logDebugInfo () |
| prepareParams () |
| processBeforeAction (Action $action) |
| triggerOnBeforeAction (Action $action) |
| processAfterAction (Action $action, $result) |
| triggerOnAfterAction (Action $action, $result) |
| create ($actionName) |
| buildActionInstance ($actionName, array $config) |
| existsAction ($actionName) |
| getDefaultPreFilters () |
| getDefaultPostFilters () |
| buildFilters (array $config=null) |
| appendFilters (array $filters, array $filtersToAppend) |
| removeFilters (array $filters, array $filtersToRemove) |
| detachFilters (Action $action) |
| detachPreFilters (Action $action) |
| detachPostFilters (Action $action) |
| getActionConfig ($actionName) |
| setActionConfig ($actionName, array $config=null) |
| runProcessingThrowable (\Throwable $throwable) |
| runProcessingException (\Exception $e) |
| runProcessingError (\Error $error) |
| runProcessingBinderThrowable (BinderArgumentException $e) |
| runProcessingValidationException (ValidationException $e) |
| buildErrorFromException (\Exception $e) |
| buildErrorFromPhpError (\Error $error) |
| runProcessingIfUserNotAuthorized () |
| runProcessingIfInvalidCsrfToken () |
| addError (Error $error) |
| addErrors (array $errors) |
| renderComponent (string $name, string $template='', array $params=[], bool $withSiteTemplate=true) |
| renderView (string $viewPath, array $params=[], bool $withSiteTemplate=true) |
| renderExtension (string $extension, array $params=[], bool $withSiteTemplate=true) |
См. определение в файле controller.php строка 35
◆ __construct()
__construct |
( |
Request | $request = null | ) |
|
◆ addError()
Adds error to error collection.
- Аргументы
-
- Возвращает
- $this
См. определение в файле controller.php строка 1070
◆ addErrors()
addErrors |
( |
array | $errors | ) |
|
|
protected |
Adds list of errors to error collection.
- Аргументы
-
- Возвращает
- $this
См. определение в файле controller.php строка 1083
◆ appendFilters()
appendFilters |
( |
array | $filters, |
|
|
array | $filtersToAppend ) |
|
finalprotected |
◆ buildActionInstance()
buildActionInstance |
( |
| $actionName, |
|
|
array | $config ) |
|
finalprotected |
◆ buildErrorFromException()
buildErrorFromException |
( |
\Exception | $e | ) |
|
|
protected |
◆ buildErrorFromPhpError()
buildErrorFromPhpError |
( |
\Error | $error | ) |
|
|
protected |
◆ buildFilters()
buildFilters |
( |
array | $config = null | ) |
|
|
finalprotected |
Builds filter by config. If there is no config, then we use default filters
- См. также
- \Bitrix\Main\Engine\Controller::getDefaultPreFilters() and
-
\Bitrix\Main\Engine\Controller::getDefaultPostFilters(). If now is POST query and there is no csrf check in config, then we add it.
- Аргументы
-
- Возвращает
- array|null
См. определение в файле controller.php строка 747
◆ className()
Returns the fully qualified name of this class.
- Возвращает
- string
См. определение в файле controller.php строка 79
◆ collectDebugInfo()
Collects debug info by Diag.
- Возвращает
- void
См. определение в файле controller.php строка 518
◆ configureActions()
- Возвращает
- array
Замещает Controllerable.
Переопределяется в CalendarAjax, CalendarEntryAjax, PublicEvent, ResourceBookingAjax, SharingAjax, SyncAjax, ProductSelector, SkuTree, HtmlEditorAjax, Call, Disk, Agreement, AuthCode, Export, LoadExt, PhoneAuth, PhoneNumber, QrCodeAuth, Rating, ComponentController, DefaultController, Token, AppForm, EInvoice, Admin, Entity, FacebookConversion, Entity, Robokassa, AuthFlow, Grabber, File, Csv, Csv, Collector и FileUploader.
См. определение в файле controller.php строка 318
◆ convertKeysToCamelCase()
convertKeysToCamelCase |
( |
| $data | ) |
|
Converts keys of array to camel case notation.
- См. также
- \Bitrix\Main\Engine\Response\Converter::OUTPUT_JSON_FORMAT
- Аргументы
-
- Возвращает
- array|mixed|string
См. определение в файле controller.php строка 288
◆ create()
◆ detachFilters()
detachFilters |
( |
Action | $action | ) |
|
|
finalprotected |
◆ detachPostFilters()
detachPostFilters |
( |
Action | $action | ) |
|
|
finalprotected |
◆ detachPreFilters()
detachPreFilters |
( |
Action | $action | ) |
|
|
finalprotected |
◆ existsAction()
existsAction |
( |
| $actionName | ) |
|
|
finalprotected |
◆ finalizeResponse()
Finalizes response. 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.
- Аргументы
-
- Возвращает
- void
См. определение в файле controller.php строка 611
◆ forward()
forward |
( |
| $controller, |
|
|
string | $actionName, |
|
|
array | $parameters = null ) |
- Аргументы
-
Controller | string | $controller | |
string | $actionName | |
array | null | $parameters | |
- Возвращает
- HttpResponse|mixed
- Исключения
-
- См. также
- \Bitrix\Main\Engine\ControllerBuilder::build
См. определение в файле controller.php строка 107
◆ generateActionMethodName()
generateActionMethodName |
( |
| $action | ) |
|
|
final |
◆ getActionConfig()
getActionConfig |
( |
| $actionName | ) |
|
|
finalprotected |
◆ getActionResponse()
getActionResponse |
( |
Action | $action | ) |
|
|
protected |
◆ getActionUri()
getActionUri |
( |
string | $actionName, |
|
|
array | $params = [], |
|
|
bool | $absolute = false ) |
|
final |
Returns uri for ajax end point for the action name. It's a helper, which uses relative action name without controller name.
- Аргументы
-
string | $actionName | Action name. It's a relative action name without controller name. |
array | $params | Parameters for creating uri. |
bool | $absolute | |
- Возвращает
- Uri
См. определение в файле controller.php строка 207
◆ getAutoWiredParameters()
getAutoWiredParameters |
( |
| ) |
|
◆ getConfigurationOfActions()
getConfigurationOfActions |
( |
| ) |
|
|
final |
◆ getCurrentUser()
◆ getDefaultAutoWiredParameters()
getDefaultAutoWiredParameters |
( |
| ) |
|
|
final |
◆ getDefaultPostFilters()
getDefaultPostFilters |
( |
| ) |
|
|
protected |
Returns default post-filters for action.
- Возвращает
- array
См. определение в файле controller.php строка 732
◆ getDefaultPreFilters()
Returns default pre-filters for action.
- Возвращает
- array
Переопределяется в Element, Mode, ProductForm, ProductSelector, SkuTree, StoreSelector, Disk, Cookies, Copilot, DiskFile, Landing, Note, User, Vibe, Address, Format, Source, Toolbar, UserFieldConfig, UserOption, JsonController, Application, Configuration, Import, File, ConsentPreview, Base, EntitySelector, Feedback и FileUploader.
См. определение в файле controller.php строка 717
◆ getErrorByCode()
Getting once error with the necessary code.
- Аргументы
-
string | $code | Code of error. |
- Возвращает
- Error
Замещает Errorable.
См. определение в файле controller.php строка 1109
◆ getErrors()
◆ getFilePath()
◆ getFullEventName()
getFullEventName |
( |
| $eventName | ) |
|
|
staticfinal |
◆ getModuleId()
Returns module id. Tries to guess module id by file path and function
- См. также
- getModuleId().
- Возвращает
- string
См. определение в файле controller.php строка 161
◆ getPrimaryAutoWiredParameter()
getPrimaryAutoWiredParameter |
( |
| ) |
|
◆ getRequest()
◆ getSaltToUnsign()
Tries to find salt from request. It's "c" (component name) in general.
- Возвращает
- string|null
См. определение в файле controller.php строка 252
◆ getScope()
◆ getSourceParametersList()
getSourceParametersList |
( |
| ) |
|
|
final |
◆ getUnsignedParameters()
getUnsignedParameters |
( |
| ) |
|
|
final |
◆ hasErrors()
◆ init()
Initializes controller. This method is invoked at the end of constructor.
- Возвращает
- void
Переопределяется в SharingAjax, ProductSelector, StoreSelector, Address, Format, Source, Export, Base, Composition, Switcher, Grabber, Csv и Csv.
См. определение в файле controller.php строка 142
◆ isLocatedUnderPsr4()
◆ listNameActions()
Returns list of all
- Возвращает
- array
См. определение в файле controller.php строка 297
◆ logDebugInfo()
Logs debug info by Diag.
- Исключения
-
Bitrix\Main\SystemException
- Возвращает
- void
См. определение в файле controller.php строка 527
◆ prepareParams()
Prepare params before process action.
- Возвращает
- bool
См. определение в файле controller.php строка 535
◆ processAfterAction()
processAfterAction |
( |
Action | $action, |
|
|
| $result ) |
|
protected |
Common operations after process action. If the method returns void or null it means that we don't want to modify $result.
- Аргументы
-
- Возвращает
- HttpResponse|mixed|void
Переопределяется в UserFieldConfig.
См. определение в файле controller.php строка 600
◆ processBeforeAction()
processBeforeAction |
( |
Action | $action | ) |
|
|
protected |
◆ processUnsignedParameters()
processUnsignedParameters |
( |
| ) |
|
|
finalprotected |
◆ redirectTo()
Redirect to URL.
- Аргументы
-
- Возвращает
- \Bitrix\Main\Engine\Response\Redirect
См. определение в файле controller.php строка 1059
◆ removeFilters()
removeFilters |
( |
array | $filters, |
|
|
array | $filtersToRemove ) |
|
finalprotected |
◆ renderComponent()
renderComponent |
( |
string | $name, |
|
|
string | $template = '', |
|
|
array | $params = [], |
|
|
bool | $withSiteTemplate = true ) |
|
finalprotected |
Returns response with component content inside site template.
Example:
public function fooAction()
{
'param' => 'value',
]);
}
renderComponent(string $name, string $template='', array $params=[], bool $withSiteTemplate=true)
- См. также
- \Bitrix\Main\Engine\Response\Render\Component
- Аргументы
-
string | $name | |
string | $template | |
array | $params | |
bool | $withSiteTemplate | |
- Возвращает
- Component
См. определение в файле controller.php строка 1136
◆ renderExtension()
renderExtension |
( |
string | $extension, |
|
|
array | $params = [], |
|
|
bool | $withSiteTemplate = true ) |
|
finalprotected |
Render extension. It's not SSR!
- См. также
- \Bitrix\Main\Engine\Response\Render\Extension
- Аргументы
-
string | $extension | |
array | $params | |
bool | $withSiteTemplate | |
- Возвращает
- Extension
См. определение в файле controller.php строка 1216
◆ renderView()
renderView |
( |
string | $viewPath, |
|
|
array | $params = [], |
|
|
bool | $withSiteTemplate = true ) |
|
finalprotected |
Render file content.
Example:
public function fooAction()
{
}
renderView(string $viewPath, array $params=[], bool $withSiteTemplate=true)
Equivalent to:
public function fooAction()
{
return $this->
renderView(
'/local/modules/my.module/views/testfile.php');
}
Example with params:
public function fooAction()
{
'id' => 123,
]);
}
Render only file content, without site template:
public function fooAction()
{
return $this->
renderView(
'/local/modules/my.module/views/testfile.php', withSiteTemplate:
false);
}
- См. также
- \Bitrix\Main\Engine\Response\Render\View
- Аргументы
-
string | $viewPath | |
array | $params | |
bool | $withSiteTemplate | |
- Возвращает
- View
См. определение в файле controller.php строка 1191
◆ run()
run |
( |
| $actionName, |
|
|
array | $sourceParametersList ) |
|
final |
- Аргументы
-
| $actionName | |
array | $sourceParametersList | |
- Возвращает
- HttpResponse|mixed
- Исключения
-
См. определение в файле controller.php строка 407
◆ runProcessingBinderThrowable()
◆ runProcessingError()
runProcessingError |
( |
\Error | $error | ) |
|
|
protected |
◆ runProcessingException()
runProcessingException |
( |
\Exception | $e | ) |
|
|
protected |
Runs processing exception.
- Аргументы
-
- Возвращает
- void
См. определение в файле controller.php строка 965
◆ runProcessingIfInvalidCsrfToken()
runProcessingIfInvalidCsrfToken |
( |
| ) |
|
|
protected |
Runs processing if csrf token is invalid.
- Возвращает
- void
См. определение в файле controller.php строка 1045
◆ runProcessingIfUserNotAuthorized()
runProcessingIfUserNotAuthorized |
( |
| ) |
|
|
protected |
Runs processing if user is not authorized.
- Возвращает
- void
См. определение в файле controller.php строка 1034
◆ runProcessingThrowable()
runProcessingThrowable |
( |
\Throwable | $throwable | ) |
|
|
protected |
◆ runProcessingValidationException()
◆ setActionConfig()
setActionConfig |
( |
| $actionName, |
|
|
array | $config = null ) |
|
finalprotected |
◆ setCurrentUser()
◆ setScope()
◆ setSourceParametersList()
setSourceParametersList |
( |
| $sourceParametersList | ) |
|
|
final |
- Аргументы
-
array | $sourceParametersList | |
- Возвращает
- Controller
См. определение в файле controller.php строка 393
◆ triggerOnAfterAction()
triggerOnAfterAction |
( |
Action | $action, |
|
|
| $result ) |
|
finalprotected |
◆ triggerOnBeforeAction()
triggerOnBeforeAction |
( |
Action | $action | ) |
|
|
finalprotected |
Triggers the event {{static::EVENT_ON_BEFORE_ACTION}}
- См. также
- \Bitrix\Main\Engine\Controller::getFullEventName. This method is invoked right before an action is executed. In case the action should not run, event handler have to return EvenResult with type EventResult::ERROR.
- Аргументы
-
Action | $action | Action name. |
- Возвращает
- bool
См. определение в файле controller.php строка 559
◆ writeToLogException()
writeToLogException |
( |
\Throwable | $e | ) |
|
|
protected |
◆ $configurator
◆ $errorCollection
◆ $request
◆ ERROR_REQUIRED_PARAMETER
const ERROR_REQUIRED_PARAMETER = 'MAIN_CONTROLLER_22001' |
◆ ERROR_UNKNOWN_ACTION
const ERROR_UNKNOWN_ACTION = 'MAIN_CONTROLLER_22002' |
◆ EVENT_ON_AFTER_ACTION
const EVENT_ON_AFTER_ACTION = 'onAfterAction' |
◆ EVENT_ON_BEFORE_ACTION
const EVENT_ON_BEFORE_ACTION = 'onBeforeAction' |
◆ EXCEPTION_UNKNOWN_ACTION
const EXCEPTION_UNKNOWN_ACTION = 22002 |
◆ SCOPE_AJAX
const SCOPE_AJAX = 'ajax' |
◆ SCOPE_CLI
◆ SCOPE_REST
const SCOPE_REST = 'rest' |
Объявления и описания членов класса находятся в файле: