"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) { // Filter items that are attached to archived Pages return $track->BrokenLinks()->exclude('Track.Page.ID', null); } return ArrayList::create(); } public function getCMSFields() { Requirements::css('silverstripe/externallinks: client/dist/styles/BrokenExternalLinksReport.css'); Requirements::javascript('silverstripe/externallinks: client/dist/js/BrokenExternalLinksReport.js'); $fields = parent::getCMSFields(); $runReportButton = FormAction::create('createReport', _t(__CLASS__ . '.RUNREPORT', 'Create new report')) ->addExtraClass('btn-primary external-links-report__create-report') ->setUseButtonTag(true); $fields->push($runReportButton); $reportResultSpan = '
'; $reportResult = LiteralField::create('ResultTitle', $reportResultSpan); $fields->push($reportResult); return $fields; } }