mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
bd17cca223
Apply SilverStripe\Reports namespace
21 lines
531 B
PHP
21 lines
531 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Reports;
|
|
|
|
/**
|
|
* A report wrapper that makes it easier to define slightly different behaviour for side-reports.
|
|
*
|
|
* This report wrapper will use sideReportColumns() for the report columns, instead of columns().
|
|
*/
|
|
class SideReportWrapper extends SS_ReportWrapper
|
|
{
|
|
public function columns()
|
|
{
|
|
if ($this->baseReport->hasMethod('sideReportColumns')) {
|
|
return $this->baseReport->sideReportColumns();
|
|
} else {
|
|
return parent::columns();
|
|
}
|
|
}
|
|
}
|