• Модуль: documentgenerator
  • Путь к файлу: ~/bitrix/modules/documentgenerator/lib/model/file.php
  • Класс: BitrixDocumentGeneratorModelFileTable
  • Вызов: FileTable::updateContent
static function updateContent($id, $content, array $options = [])
{
	$data = static::getById($id)->fetch();
	if($data)
	{
		/** @var Storage $storage */
		$storage = new $data['STORAGE_TYPE'];
		$result = $storage->write($content, $options);
		if($result->isSuccess())
		{
			$result = static::update($id, ['STORAGE_WHERE' => $result->getId()]);
			if($result->isSuccess())
			{
				$storage->delete($data['STORAGE_WHERE']);
			}
		}
	}
}