<?php

/*
* This file is part of eSales Media cookieconsent module
*
* (c) Benjamin Roth
*
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL
*/

namespace EsalesMedia\Cookieconsent\EventListener;

class TemplateListener
{
  public function onOutputFrontendTemplate($strBuffer)
  {
    $Template = new \FrontendTemplate('cookieconsent');

    $strInject = $Template->parse();
    return str_replace('</body>',$strInject . '</body>',$strBuffer);
  }
}