• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/onlyoffice/models/documentsessioncontext.php
  • Класс: BitrixDiskDocumentOnlyOfficeModelsDocumentSessionContext
  • Вызов: DocumentSessionContext::getAttachedObject
public function getAttachedObject(): ?AttachedObject
{
	if (!$this->getAttachedObjectId())
	{
		return null;
	}

	if (!$this->attachedObject)
	{
		$this->attachedObject = AttachedObject::loadById($this->getAttachedObjectId(), ['OBJECT']);
		if (!$this->attachedObject)
		{
			$this->attachedObjectId = null;

			return null;
		}

		$this->setObject($this->attachedObject->getFile());
	}

	return $this->attachedObject;
}