• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/document/localdocumentcontroller.php
  • Класс: BitrixDiskDocumentLocalDocumentController
  • Вызов: LocalDocumentController::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_LOCAL_DOC_CONTROLLER_ERROR_COULD_NOT_FIND_FILE'), self::ERROR_COULD_NOT_FIND_FILE)));
		$this->sendJsonResponse(array('status' => self::STATUS_NOT_FOUND));
	}
	$this->file = $this->version->getObject();
	if(!$this->file)
	{
		$this->errorCollection->add(array(new Error(Loc::getMessage('DISK_LOCAL_DOC_CONTROLLER_ERROR_COULD_NOT_FIND_VERSION'), self::ERROR_COULD_NOT_FIND_VERSION)));
		$this->sendJsonResponse(array('status' => self::STATUS_NOT_FOUND));
	}
}