public function generate()
{
if (TL_MODE == 'BE') {
/** @var BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FMD']['quicklink'][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();
}
// Redirect to selected page
if (\Input::post('FORM_SUBMIT') == 'tl_quicklink_' . $this->id) {
$this->redirect(\Input::post('target', true));
}
// Always return an array (see #4616)
$this->pages = \StringUtil::deserialize($this->pages, true);
if (empty($this->pages) || $this->pages[0] == '') {
return '';
}
return parent::generate();
}