• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/historyservice.php
  • Класс: CBPHistoryService
  • Вызов: CBPHistoryService::recoverDocumentFromHistory
static function recoverDocumentFromHistory($id)
{
	$arHistory = self::GetById($id);
	if (!$arHistory)
		throw new Exception(str_replace("#ID#", intval($id), GetMessage("BPCGHIST_INVALID_ID")));

	list($moduleId, $entity, $documentId) = CBPHelper::ParseDocumentId($arHistory["DOCUMENT_ID"]);

	if ($moduleId <> '')
		CModule::IncludeModule($moduleId);

	if (class_exists($entity))
		return call_user_func_array(array($entity, "RecoverDocumentFromHistory"), array($documentId, $arHistory["DOCUMENT"]));

	return false;
}