public function generate() { if (TL_MODE == 'BE') { $objTemplate = new \BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['filecredit'][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->arrPids = \Database::getInstance()->getChildRecords(array($this->rootPage), 'tl_page'); // TEST return parent::generate(); }
public static function isRequestAlias($strRequest, $strAlias) { $blnCheck = true; if (FileCredit::isIndexSuspended()) { return false; } if ($strRequest != $strAlias) { $blnCheck = false; } if (\Config::get('useAutoItem') && isset($_GET['auto_item'])) { if (is_array($GLOBALS['TL_AUTO_ITEM']) && is_array($_GET) && is_array($GLOBALS['TL_AUTO_ITEM'])) { $arrSet = array_intersect(array_keys($_GET), $GLOBALS['TL_AUTO_ITEM']); if (!empty($arrSet)) { $blnCheck = true; } } } return $blnCheck; }
protected function compile() { FileCredit::indexStop(); $arrPids = array(); if ($this->defineRoot && $this->rootPage > 0) { if (($objRoot = $this->objModel->getRelated('rootPage')) !== null) { $arrPids = \Database::getInstance()->getChildRecords(array($objRoot->id), 'tl_page'); } } $objCredits = FileCreditModel::findByPublished(); if ($objCredits === null) { $this->Template->empty = $GLOBALS['TL_LANG']['MSC']['emptyCreditList']; return; } $this->Template->cssClass = 'sortby_' . $this->creditsSortBy; $this->Template->cssClass .= $this->creditsGroupBy ? ' groupby_' . $this->creditsGroupBy : ''; $this->Template->group = $this->creditsGroupBy; $this->Template->credits = FileCredit::parseCredits($objCredits, $arrPids, $this); FileCredit::indexContinue(); }