system/modules/47_CustomModule/library/CustomModule/Frontend/Modules/ModOrderFreeProduct.php line 50

Open in your IDE?
  1. <?php
  2. /**
  3.  * dev.sympathiemagazin for Contao Open Source CMS
  4.  *
  5.  * Copyright (C) 2019 47GradNord - Agentur für Internetlösungen
  6.  *
  7.  * @license    commercial
  8.  * @author     Holger Neuner
  9.  */
  10. namespace CustomModule\Frontend\Modules;
  11. use Contao\BackendTemplate;
  12. use Contao\Input;
  13. class ModOrderFreeProduct extends AbstractModule
  14. {
  15.     /**
  16.      * Template
  17.      * @var string
  18.      */
  19.     protected $strTemplate 'mod_OrderFreeProduct';
  20.     protected $orderfree;
  21.     /**
  22.      * Display a wildcard in the back end
  23.      *
  24.      * @return string
  25.      */
  26.     public function generate()
  27.     {
  28.         if (TL_MODE == 'BE')
  29.         {
  30.             /** @var \BackendTemplate|object $objTemplate */
  31.             $objTemplate = new BackendTemplate('be_wildcard');
  32.             $objTemplate->wildcard '### ' utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['47_ModOrderFreeProduct'][0]) . ' ###';
  33.             $objTemplate->title $this->headline;
  34.             $objTemplate->id $this->id;
  35.             $objTemplate->link $this->name;
  36.             $objTemplate->href 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' $this->id;
  37.             return $objTemplate->parse();
  38.         }
  39.         return parent::generate();
  40.     }
  41.     /**
  42.      * Generate the module
  43.      */
  44.     protected function compile()
  45.     {
  46.         $this->Template->checkSessionSurfey = (!$this->checkSessionSurfey()) ? false true;
  47.         $this->Template->modOrderProductText = \StringUtil::toHtml5($this->modOrderProductText);
  48.         $this->Template->getOrderFree Input::get('orderfree');
  49.     }
  50. }