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(); }