"Checked", 'Link' => array( 'title' => 'External Link', 'formatting' => function($value, $item) { return sprintf( '%s', Convert::raw2att($item->Link), Convert::raw2xml($item->Link) ); } ), 'HTTPCodeDescription' => 'HTTP Error Code', "Title" => array( "title" => 'Page link is on', 'formatting' => function($value, $item) { $page = $item->Page(); return sprintf( '%s', Convert::raw2att($page->CMSEditLink()), Convert::raw2xml($page->Title) ); } ) ); } /** * Alias of columns(), to support the export to csv action * in {@link GridFieldExportButton} generateExportFileData method. * @return array */ public function getColumns() { return $this->columns(); } public function sourceRecords() { $track = BrokenExternalPageTrackStatus::get_latest(); if ($track) return $track->BrokenLinks(); return new ArrayList(); } public function getCMSFields() { Requirements::javascript('externallinks/javascript/BrokenExternalLinksReport.js'); $fields = parent::getCMSFields(); $reportResultSpan = ' br> br>
'; $reportResult = new LiteralField('ResultTitle', $reportResultSpan); $fields->push($reportResult); $button = ''; $runReportButton = new LiteralField( 'runReport', sprintf( $button, _t('ExternalBrokenLinksReport.RUNREPORT', 'Create new report') ) ); $fields->push($runReportButton); return $fields; } }