- Модуль: disk
- Путь к файлу: ~/bitrix/modules/disk/lib/document/onlyoffice/models/documentsession.php
- Класс: BitrixDiskDocumentOnlyOfficeModelsDocumentSession
- Вызов: DocumentSession::forkForUser
public function forkForUser(int $userId, ?DocumentSessionContext $context = null): ?self
{
return self::add([
'EXTERNAL_HASH' => $this->getExternalHash(),
'OBJECT_ID' => $this->getObjectId(),
'VERSION_ID' => $this->getVersionId(),
'USER_ID' => $userId,
'OWNER_ID' => $this->getOwnerId(),
'IS_EXCLUSIVE' => $this->isExclusive(),
'TYPE' => $this->getType(),
'CONTEXT' => $context? $context->toJson() : $this->getContextRaw(),
], $this->errorCollection);
}