From 325d39736f2dbf604cfb09ca021d20a918698cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 13 Apr 2021 17:07:34 +0200 Subject: [PATCH] wip --- app/Utils/TemplateEngine.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php index 31637e83853a..7ed921c639da 100644 --- a/app/Utils/TemplateEngine.php +++ b/app/Utils/TemplateEngine.php @@ -198,6 +198,33 @@ class TemplateEngine $wrapper = str_replace('', $injection, $wrapper); } + +// $root = new DOMDocument(); +// $root->loadHTML(' +// +// +// +// +// +//
+//
+//
'); +// +// $node = new DOMDocument(); +// $node->loadXML('

This is my content

'); +// +// $node = $root->importNode($node->documentElement, true); +// +//// $root->documentElement->appendChild($node); +// +// $root->getElementById('content')->appendChild($node); +// $root->getElementById('content')->ownerDocument->saveHTML(); +// +// var_dump($root->getElementById('content')->ownerDocument->saveHTML($root->getElementsByTagName('table')->item(0))); + + $wrapper_document = new \DOMDocument(); + $wrapper_document->loadHTML($wrapper); + $data = [ 'subject' => $this->subject, 'body' => $this->body,