method
public
static
Document::upload()
Сигнатура
public static upload(Template $template, mixed $value, mixed $title, mixed $number, mixed $fileId[, null $pdfId = null ][, null $imageId = null ]) : Result
Описание
Загружает новый документ, сформированный извне
Параметры
$template
Template
$value
mixed
$title
mixed
$number
mixed
$fileId
mixed
$pdfId
null
= null
$imageId
null
= null
Возвращаемое значение
Result
Как применяется в Document
Document::upload() — метод класса \Bitrix\DocumentGenerator\Document модуля «Генератор документов».
Статический метод — вызывается через имя класса Document, без создания объекта.
use Bitrix\Main\Loader;
use Bitrix\DocumentGenerator\Document;
Loader::includeModule('documentgenerator');
$template = null; // Template
$value = null;
$title = null;
$number = null;
$fileId = null;
$result = Document::upload($template, $value, $title, $number, $fileId);
// $result: ResultДругие методы Document
__get()actualize()Пересоздать документ, используя те же внешние значения.checkFields()Если $requiredOnly равно true, возвращает список обязательных с пустыми значениями.createByTemplate()Создаёт новый документ из шаблона на основе конкретного значения.enablePublicUrl()enableStamps()excludeFields()Добавляет $fieldNames в $this->excludeFields (не перезаписывает их)getCreateTime()getCreationMethod()getDownloadUrl()getEmailDiskFile()getFields()Возвращает массив со всеми плейсхолдерами, их описаниями полей и фактическими значениями.
Исходный файл: source/documentgenerator/lib/document.php:1710

