/** * Post-processes page HTML code before it's sent to the client. * Note for pre-processing see cms.template.processTwigContent event. * @param \Cms\Classes\Page $page Specifies the current CMS page. * @param string $url Specifies the current URL. * @param string $content The page markup to post processs. * @return string Returns the updated result string. */ protected function postProcessResult($page, $url, $content) { $content = MediaViewHelper::instance()->processHtml($content); $dataHolder = (object) ['content' => $content]; Event::fire('cms.page.postprocess', [$this, $url, $page, $dataHolder]); return $dataHolder->content; }
/** * Post-processes page HTML code before it's sent to the client. * @param \Cms\Classes\Page $page Specifies the current CMS page. * @param string $url Specifies the current URL. * @param string $html The page markup to post processs. * @return string Returns the updated result string. */ protected function postProcessResult($page, $url, $html) { $html = MediaViewHelper::instance()->processHtml($html); $holder = (object) ['html' => $html]; Event::fire('cms.page.postprocess', [$this, $url, $page, $holder]); return $holder->html; }