message = $message; } $this->showrecordcount = $showrecordcount; } public function getHTMLFragments($gridField) { $count = $gridField->getList()->count(); $forTemplate = new ArrayData([ 'ShowRecordCount' => $this->showrecordcount, 'Message' => $this->message, 'FirstShownRecord' => 1, 'LastShownRecord' => $count, 'NumRecords' => $count ]); $template = SSViewer::get_templates_by_class($this, '', __CLASS__); return [ 'footer' => $forTemplate->renderWith( $template, [ 'Colspan' => count($gridField->getColumns() ?? []) ] ) ]; } }