• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/downloadcontroller.php
  • Класс: BitrixDiskDownloadController
  • Вызов: DownloadController::processActionShowViewHtml
protected function processActionShowViewHtml($pathToView, $mode = '', $print = '', $preview = '', $sizeType = '', $printUrl = '', $autostart = 'Y')
{
	$printParam = $iframe = 'N';
	if($mode === 'iframe')
	{
		$iframe = 'Y';
		if($print === 'Y')
		{
			$printParam = 'Y';
		}
	}
	$elementId = 'bx_ajaxelement_' . $this->file->getId() . '_' . randString(4);
	$this->version = $this->file->getVersion($this->versionId);
	if($this->version)
	{
		$view = $this->version->getView();
	}
	else
	{
		$view = $this->file->getView();
	}
	$html = $view->render(array(
		'PATH' => $pathToView,
		'IFRAME' => $iframe,
		'ID' => $elementId,
		'PRINT' => $printParam,
		'PREVIEW' => $preview,
		'SIZE_TYPE' => $sizeType,
		'PRINT_URL' => $printUrl,
		'AUTOSTART' => ($autostart !== 'Y' ? 'N' : 'Y'),
	));
	if($iframe == 'Y')
	{
		echo $html;
	}
	else
	{
		$result = array('html' => $html, 'innerElementId' => $elementId);
		$result = array_merge($result, $view->getJsViewerAdditionalJsonParams());
		$this->sendJsonResponse($result);
	}
	$this->end();
}