'col-buttons'); } /** * Add the title * * @param GridField $gridField * @param string $columnName * @return array */ public function getColumnMetadata($gridField, $columnName) { if($columnName == 'Actions') { return array('title' => ''); } return array(); } /** * Which columns are handled by this component * * @param type $gridField * @return type */ public function getColumnsHandled($gridField) { return array('Actions'); } /** * @param GridField $gridField * @param DataObject $record * @param string $columnName * * @return string - the HTML for the column */ public function getColumnContent($gridField, $record, $columnName) { $data = new ArrayData(array( 'Link' => method_exists($record, 'getExternalLink') ? $record->getExternalLink() : $record->ExternalLink )); return $data->renderWith('GridFieldExternalLink'); } }