method
public
static
Body::readFromStorage()
Сигнатура
public static readFromStorage(Storage $storage, mixed $from) : static|false
Параметры
$storage
Storage
$from
mixed
Возвращаемое значение
static|false
Как применяется в Body
Body::readFromStorage() — метод класса \Bitrix\DocumentGenerator\Body модуля «Генератор документов».
Статический метод — вызывается через имя класса Body, без создания объекта.
use Bitrix\Main\Loader;
use Bitrix\DocumentGenerator\Body;
Loader::includeModule('documentgenerator');
$storage = null; // Storage
$from = null;
$result = Body::readFromStorage($storage, $from);
// $result: static|falseДругие методы Body
detectHtml()getCodeFromPlaceholder()getContent()getFieldNames()getFields()getFileExtension()getFileMimeType()getPlaceholders()getStorage()isFileProcessable()normalizeContent()Нормализует содержимое body.process()Разобрать $content, обработать команды, заполнить значения.
readFromStorage() есть и у других классов модуля «Генератор документов»: Docx, DocxXml, PlainText, Xml, ZipDocument.
Исходный файл: source/documentgenerator/lib/body.php:50

