/**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['eventlist_plus'][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();
     }
     $this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
     // Return if there are no calendars
     if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
         return '';
     }
     parent::generate();
     // needs to be overwritten in model, otherwise datacontainer argument in options_callback contains protected calendars
     $this->objModel->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
     $objForm = new EventFilterForm($this->objModel);
     if (($strForm = $objForm->generate()) === null) {
         return '';
     }
     $this->Template->form = $objForm->generate();
     return $this->Template->parse();
 }
 /**
  * Display a wildcard in the back end
  * @return string
  */
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['eventlist_plus'][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();
     }
     $this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
     // Return if there are no calendars
     if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
         return '';
     }
     // Show the event reader if an item has been selected
     if (!$this->cal_showInModal && $this->cal_readerModule > 0 && (isset($_GET['events']) || \Config::get('useAutoItem') && isset($_GET['auto_item']))) {
         return $this->getFrontendModule($this->cal_readerModule, $this->strColumn);
     }
     return parent::generate();
 }
 protected function generateAjax()
 {
     // ajax request ist not delegated to this module
     if (!(\Input::get('scope') == 'modal' && \Input::get('target') == EventsPlusHelper::getCSSModalID($this->id))) {
         return false;
     }
     if ($this->checkConditions()) {
         parent::generate();
         // use output, otherwise page will not be added to search index
         $strOutput = $this->isSearchIndexer() ? $this->Template->output() : $this->Template->parse();
         die($this->replaceInsertTags($strOutput));
     }
 }