mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #54 from sminnee/the-chrisening
MINOR: Make use of static::class
This commit is contained in:
commit
fa7e0825c5
@ -171,7 +171,7 @@ class Report extends ViewableData
|
|||||||
{
|
{
|
||||||
return Controller::join_links(
|
return Controller::join_links(
|
||||||
ReportAdmin::singleton()->Link('show'),
|
ReportAdmin::singleton()->Link('show'),
|
||||||
$this->sanitiseClassName(get_class($this)),
|
$this->sanitiseClassName(static::class),
|
||||||
$action
|
$action
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ class Report extends ViewableData
|
|||||||
$sourceRecords = $this->sourceRecords($params, null, null);
|
$sourceRecords = $this->sourceRecords($params, null, null);
|
||||||
if (!$sourceRecords instanceof SS_List) {
|
if (!$sourceRecords instanceof SS_List) {
|
||||||
|
|
||||||
user_error(get_class($this) . "::sourceRecords does not return an SS_List", E_USER_NOTICE);
|
user_error(static::class . "::sourceRecords does not return an SS_List", E_USER_NOTICE);
|
||||||
return "-1";
|
return "-1";
|
||||||
}
|
}
|
||||||
return $sourceRecords->count();
|
return $sourceRecords->count();
|
||||||
|
@ -28,7 +28,7 @@ abstract class ReportWrapper extends Report
|
|||||||
|
|
||||||
public function ID()
|
public function ID()
|
||||||
{
|
{
|
||||||
return get_class($this->baseReport) . '_' . get_class($this);
|
return get_class($this->baseReport) . '_' . static::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -43,7 +43,7 @@ class SideReportView extends ViewableData
|
|||||||
$columns = $this->report->columns();
|
$columns = $this->report->columns();
|
||||||
|
|
||||||
if ($records && $records->Count()) {
|
if ($records && $records->Count()) {
|
||||||
$result = "<ul class=\"" . get_class($this) . "\">\n";
|
$result = "<ul class=\"" . static::class . "\">\n";
|
||||||
|
|
||||||
foreach ($records as $record) {
|
foreach ($records as $record) {
|
||||||
$result .= "<li>\n";
|
$result .= "<li>\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user