silverstripe-reports/code/SideReportWrapper.php

21 lines
528 B
PHP
Raw Normal View History

<?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().
*/
2016-09-09 08:11:38 +02:00
class SideReportWrapper extends ReportWrapper
{
public function columns()
{
if ($this->baseReport->hasMethod('sideReportColumns')) {
return $this->baseReport->sideReportColumns();
} else {
return parent::columns();
}
}
}