• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/view/document.php
  • Класс: BitrixDiskViewDocument
  • Вызов: Document::render
public function render($params = array())
{
	if(empty($params) || !isset($params['PATH']) || empty($params['PATH']))
	{
		return '';
	}
	if(is_array($params['PATH']))
	{
		$params['PATH'] = reset($params['PATH']);
	}
	$filename = $this->getName();

	if (!isset($params['HEIGHT']))
	{
		$params['HEIGHT'] = $this->getJsViewerHeight();
	}
	if (!isset($params['WIDTH']))
	{
		$params['WIDTH'] = $this->getJsViewerWidth();
	}

	ob_start();
	global $APPLICATION;
	$APPLICATION->IncludeComponent(
		'bitrix:pdf.viewer',
		'',
		array_merge($params, array(
			'TITLE' => $filename,
		)
	));
	return ob_get_clean();
}