public function onOutputFrontendTemplate($buffer)
    {
        if (null !== ($rootPage = PageModel::findByPk($GLOBALS['objPage']->rootId)) && $rootPage->cookiebar_enable) {
            $generator = new CookiebarGenerator();
            $cookiebar = $generator->createTemplate($rootPage->row())->parse();

            if ('before_wrapper' === $rootPage->cookiebar_placement) {
                $buffer = str_replace('<div id="wrapper">', $cookiebar.'<div id="wrapper">', $buffer);
            } else {
                $buffer = str_replace('</body>', $cookiebar.'</body>', $buffer);
            }
        }

        return $buffer;
    }
public function onOutputFrontendTemplate($buffer)
    {
        if (null !== ($rootPage = PageModel::findByPk($GLOBALS['objPage']->rootId)) && $rootPage->cookiebar_enable) {
            $generator = new CookiebarGenerator();
            $cookiebar = $generator->createTemplate($rootPage->row())->parse();

            if ('before_wrapper' === $rootPage->cookiebar_placement) {
                $buffer = str_replace('<div id="wrapper">', $cookiebar.'<div id="wrapper">', $buffer);
            } else {
                $buffer = str_replace('</body>', $cookiebar.'</body>', $buffer);
            }
        }

        return $buffer;
    }
public function onOutputFrontendTemplate ( $ buffer ) { if ( null !== ( $ rootPage = PageModel :: findByPk ( $ GLOBALS [ 'objPage' ] -> rootId ) ) && $ rootPage -> cookiebar_enable ) { $ generator = new CookiebarGenerator ( ) ; $ cookiebar = $ generator -> createTemplate ( $ rootPage -> row ( ) ) -> parse ( ) ; if ( 'before_wrapper' === $ rootPage -> cookiebar_placement ) { $ buffer = str_replace ( '<div id="wrapper">' , $ cookiebar . '<div id="wrapper">' , $ buffer ) ; } else { $ buffer = str_replace ( '</body>' , $ cookiebar . '</body>' , $ buffer ) ; } } return $ buffer ; }
On output the frontend template.

@param string $buffer

@return string
On output the frontend template .