• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/documentcontroller.php
  • Класс: BitrixDiskDocumentDocumentController
  • Вызов: DocumentController::initializeVersion
protected function initializeVersion($versionId)
{
	$this->version = Version::loadById($versionId, array('OBJECT.STORAGE'));
	if(!$this->version)
	{
		$this->errorCollection->add(array(new Error(Loc::getMessage('DISK_DOC_CONTROLLER_ERROR_COULD_NOT_FIND_FILE'), self::ERROR_COULD_NOT_FIND_FILE)));
		$this->sendJsonErrorResponse();
	}
	$this->file = $this->version->getObject();
	if(!$this->file)
	{
		$this->errorCollection->add(array(new Error(Loc::getMessage('DISK_DOC_CONTROLLER_ERROR_COULD_NOT_FIND_VERSION'), self::ERROR_COULD_NOT_FIND_VERSION)));
		$this->sendJsonErrorResponse();
	}
}