/**
  * 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']['newslist_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();
     }
     // set news categories from filter
     if (\Input::get('newscategories')) {
         $this->news_archives = explode(',', \Input::get('newscategories'));
         $this->filterActive = true;
     }
     $this->news_archives = $this->sortOutProtected(deserialize($this->news_archives));
     // Return if there are no archives
     if (!is_array($this->news_archives) || empty($this->news_archives)) {
         return '';
     }
     $GLOBALS['NEWS_FILTER_CATEGORIES'] = $this->news_filterCategories ? true : false;
     $GLOBALS['NEWS_FILTER_DEFAULT'] = deserialize($this->news_filterDefault, true);
     $GLOBALS['NEWS_FILTER_PRESERVE'] = $this->news_filterPreserve;
     if ($this->news_filterModule) {
         $this->objFilter = \ModuleModel::findByPk($this->news_filterModule);
     }
     $this->news_categories = array();
     // set news categories from filter
     if (\Input::get('categories')) {
         $this->news_categories = explode(',', \Input::get('categories'));
         $this->filterActive = true;
     }
     // Show the event reader if an item has been selected
     if (!$this->news_showInModal && $this->news_readerModule > 0 && (isset($_GET['news']) || \Config::get('useAutoItem') && isset($_GET['auto_item']))) {
         return $this->getFrontendModule($this->news_readerModule, $this->strColumn);
     }
     // filter
     if (\Input::get('startDate')) {
         $this->startDate = strtotime(\Input::get('startDate') . ' 00:00:00');
         $this->filterActive = true;
     }
     if (\Input::get('endDate')) {
         $this->endDate = strtotime(\Input::get('endDate') . ' 23:59:59');
         $this->filterActive = true;
     }
     if (\Input::get('searchKeywords')) {
         $this->strKeywords = trim(\Input::get('searchKeywords'));
         $this->filterActive = true;
         $this->filterSearch = true;
     }
     return parent::generate();
 }
 public function generate()
 {
     if (TL_MODE == 'BE') {
         $objTemplate = new \BackendTemplate('be_wildcard');
         $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD'][$this->type][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();
 }