silverstripe-reports/code/SideReportWrapper.php

21 lines
531 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().
*/
class SideReportWrapper extends SS_ReportWrapper
{
public function columns()
{
if ($this->baseReport->hasMethod('sideReportColumns')) {
return $this->baseReport->sideReportColumns();
} else {
return parent::columns();
}
}
}