- Модуль: disk
- Путь к файлу: ~/bitrix/modules/disk/lib/controller/documentservice.php
- Класс: BitrixDiskControllerDocumentService
- Вызов: DocumentService::goToPreviewAction
public function goToPreviewAction($serviceCode, $attachedObjectId = null, $objectId = null, $versionId = null)
{
$driver = Driver::getInstance();
$handlersManager = $driver->getDocumentHandlersManager();
$documentHandler = $handlersManager->getHandlerByCode($serviceCode);
if (!$documentHandler)
{
$this->addError(new Error('There is no document service by code'));
}
if ($documentHandler instanceof OnlyOfficeHandler)
{
/** @see BitrixDiskControllerOnlyOffice::loadDocumentViewerAction() */
return $this->forward(OnlyOffice::class, 'loadDocumentViewer', [
'attachedObjectId' => $attachedObjectId,
'objectId' => $objectId,
'versionId' => $versionId,
]);
}
}