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

