<?php
/**
* dev.sympathiemagazin for Contao Open Source CMS
*
* Copyright (C) 2019 47GradNord - Agentur für Internetlösungen
*
* @license commercial
* @author Holger Neuner
*/
namespace CustomModule\Frontend\Modules;
use Contao\BackendTemplate;
use Contao\Input;
class ModOrderFreeProduct extends AbstractModule
{
/**
* Template
* @var string
*/
protected $strTemplate = 'mod_OrderFreeProduct';
protected $orderfree;
/**
* Display a wildcard in the back end
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE')
{
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['47_ModOrderFreeProduct'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
return parent::generate();
}
/**
* Generate the module
*/
protected function compile()
{
$this->Template->checkSessionSurfey = (!$this->checkSessionSurfey()) ? false : true;
$this->Template->modOrderProductText = \StringUtil::toHtml5($this->modOrderProductText);
$this->Template->getOrderFree = Input::get('orderfree');
}
}