Component
\Bitrix\Main\Engine\Response\Component - methods for handling components.
When component must be loaded in ajax, you need use action to return \Bitrix\Main\Engine\Response\Component
. Constructor signature matches with $APPLICATION->IncludeComponent($name, $template, $parameters)
new \Bitrix\Main\Engine\Response\Component('bitrix:disk.file.view', '', [ 'FILE_ID' => $fileId, ]);
Generates response for component:
{ "status": string, "data": { "html": string, "assets": { "css": array, "js": array, "string": array }, "additionalParams": array }, "errors": array }
Methods
Method | Description | Available from version |
---|---|---|
__construct( $componentName, $componentTemplate = '', array $componentParams = [], array $additionalResponseParams = [], $dataKeys = [] ) | Constructor method. Parameters:
|
© «Bitrix24», 2001-2024