Added beforeProcess event to HtmlOutputNodeProcessor (#2155)
authorPeter Frühwirt <peter.fruehwirt@viecode.com>
Thu, 29 Dec 2016 16:59:17 +0000 (17:59 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 29 Dec 2016 16:59:17 +0000 (17:59 +0100)
* Added preProcess event to HtmlOutputNodeProcessor

Added possibility for plugins to change html output on every request (like it is done with keywords highlighting)

* Changed event name in HtmlOutputNodeProcessor

wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php

index e8786dad995d781099152fa52599b88fa8760833..35c35e06fe11797c70200d465a4f2448cff9c57a 100644 (file)
@@ -2,6 +2,7 @@
 namespace wcf\system\html\output\node;
 use wcf\system\bbcode\HtmlBBCodeParser;
 use wcf\system\bbcode\KeywordHighlighter;
+use wcf\system\event\EventHandler;
 use wcf\system\html\node\AbstractHtmlNodeProcessor;
 use wcf\system\html\node\IHtmlNode;
 use wcf\util\DOMUtil;
@@ -59,6 +60,9 @@ class HtmlOutputNodeProcessor extends AbstractHtmlNodeProcessor {
         * @inheritDoc
         */
        public function process() {
+               // fire event action
+               EventHandler::getInstance()->fireAction($this, 'beforeProcess');
+               
                // highlight keywords
                $this->highlightKeywords();