mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MNT Update method signature for test class (#191)
This commit is contained in:
parent
be2dc34ca6
commit
0cb9d96ab3
@ -431,7 +431,7 @@ class Report extends ViewableData
|
||||
if ($item instanceof CMSPreviewable) {
|
||||
return sprintf(
|
||||
'<a class="grid-field__link-block" href="%s" title="%s">%s</a>',
|
||||
Convert::raw2att($item->CMSEditLink()),
|
||||
Convert::raw2att($item->getCMSEditLink()),
|
||||
Convert::raw2att($value),
|
||||
Convert::raw2xml($value)
|
||||
);
|
||||
|
@ -95,8 +95,8 @@ class SideReportView extends ViewableData
|
||||
}
|
||||
|
||||
if (isset($info['link']) && $info['link']) {
|
||||
$link = ($info['link'] === true && $record->hasMethod('CMSEditLink'))
|
||||
? $record->CMSEditLink()
|
||||
$link = ($info['link'] === true && $record->hasMethod('getCMSEditLink'))
|
||||
? $record->getCMSEditLink()
|
||||
: $info['link'];
|
||||
return $prefix . "<a $classClause href=\"$link\">$val</a>";
|
||||
} else {
|
||||
|
@ -24,7 +24,7 @@ class FakeObject extends DataObject implements CMSPreviewable, TestOnly
|
||||
return Controller::join_links('dummy-link', $this->ID);
|
||||
}
|
||||
|
||||
public function CMSEditLink()
|
||||
public function getCMSEditLink(): ?string
|
||||
{
|
||||
return Controller::join_links('dummy-edit-link', $this->ID);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user