silverstripe-reports/code/SideReportWrapper.php
Damian Mooyman bd17cca223
Upgrade code for namespaces
Apply SilverStripe\Reports namespace
2016-09-08 15:37:35 +12:00

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();
}
}
}