- Модуль: report
- Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/internal/engine/response/component.php
- Класс: BitrixReportVisualConstructorInternalEngineResponseComponent
- Вызов: Component::__construct
public function __construct($componentName, $templateName = '', $params = [], $additionalResponseParams = [], $parentComponent = [], $functionParams = [], $status = self::STATUS_SUCCESS, ErrorCollection $errorCollection = null)
{
$this->asset = Asset::getInstance();
// Temporary fix
$this->asset->disableOptimizeCss();
$this->asset->disableOptimizeJs();
$this->setHeaders(new HttpHeaders());
global $APPLICATION;
ob_start();
$APPLICATION->IncludeComponent(
$componentName,
$templateName,
$params,
$parentComponent,
$functionParams
);
$componentContent = ob_get_clean();
$this->status = $status?: self::STATUS_SUCCESS;
$this->errorCollection = $errorCollection?: new ErrorCollection;
$this->collectAssetsPathList();
$this->setData([
'status' => $this->status,
'data' => $componentContent,
'assets' => [
'js' => $this->getJsList(),
'css' => $this->getCssList(),
'string' => $this->getStringList()
],
'additionalParams' => $additionalResponseParams,
'errors' => $this->getErrorsToResponse(),
]);
}