- Модуль: disk
- Путь к файлу: ~/bitrix/modules/disk/lib/urlmanager.php
- Класс: BitrixDiskUrlManager
- Вызов: UrlManager::getUrlForShowViewHtml
public function getUrlForShowViewHtml(File $file, array $params = array(), $absolute = false)
{
$params['filename'] = $file->getView()->getName();
if(mb_strlen($params['filename']) > 80)
{
$params['filename'] = mb_substr($params['filename'], 0, 37).'...'.mb_substr($params['filename'], -37);
}
$preview = $this->getUrlForShowPreview($file);
if($file->getView() instanceof Video)
{
$pathToView = [
$this->getUrlForShowView($file, $params),
$this->getUrlForShowFile($file, $params),
];
}
else
{
$pathToView = $this->getUrlForShowView($file, $params);
$printUrl = $this->getUrlDownloadController('showViewHtml', array_merge($params, array('fileId' => $file->getId(), 'pathToView' => $pathToView, 'preview' => $preview, 'print' => 'Y', 'mode' => 'iframe')), $absolute);
}
return $this->getUrlDownloadController('showViewHtml', array_merge($params, array('fileId' => $file->getId(), 'pathToView' => $pathToView, 'preview' => $preview, 'printUrl' => $printUrl)), $absolute);
}