SilverStripe\Reports\ReportWrapper
SS_ReportWrapper is a base class for creating report wappers.
Wrappers encapsulate an existing report to alter their behaviour - they are implementations of
the standard GoF decorator pattern.
This base class ensure that, by default, wrappers behave in the same way as the report that is
being wrapped. You should override any methods that need to behave differently in your subclass
of SS_ReportWrapper.
It also makes calls to 2 empty methods that you can override and
Synopsis
class ReportWrapper
extends Report
{
- // members
- protected $baseReport;
- // Inherited members from Report
- protected string $title;
- protected string $description;
- protected $dataClass;
- protected integer $sort;
- // methods
- public void __construct()
- public void ID()
- public void parameterFields()
- public void columns()
- public void beforeQuery()
- public void afterQuery()
- public void sourceQuery()
- public void sourceRecords()
- public void title()
- public void group()
- public void sort()
- public void description()
- public void canView()
- // Inherited methods from Report
- public void title()
- public string getTitle()
- public void description()
- public DataQuery sourceQuery()
- public SS_List records()
- public void columns()
- public void dataClass()
- public void getLink()
- protected string sanitiseClassName()
- public int getCount()
- public static array get_excluded_reports()
- public static array get_reports()
- public FieldList getCMSFields()
- public void getCMSActions()
- public FormField getReportField()
- public boolean canView()
- public boolean|null extendedCan()
- public string TreeTitle()
- public array getBreadcrumbs()
- protected array getSourceParams()
Hierarchy
Extends
Members
protected
- $baseReport
-
$dataClass
The class of object being managed by this report. - $description
—
string
This is a description about what this report does. Used by the ReportAdmin templates. - $sort
—
int
A field that specifies the sort order of this report - $title
—
string
This is the title of the report, used by the ReportAdmin templates.
Methods
public
- __construct()
- ID()
- afterQuery() — Override this method to perform some actions after querying.
- beforeQuery() — Override this method to perform some actions prior to querying.
- canView()
- columns()
- description()
- group()
- parameterFields()
- sort()
- sourceQuery()
- sourceRecords()
- title()
Inherited from SilverStripe\Reports\Report
protected
- getSourceParams() — Get source params for the report to filter by
- sanitiseClassName() — Sanitise a model class' name for inclusion in a link
public
- TreeTitle() — Return the name of this report, which is used by the templates to render the name of the report in the report tree, the left hand pane inside ReportAdmin.
- canView()
- columns()
- dataClass() — Return the data class for this report
- description() — Return the description of this report.
- extendedCan() — Helper to assist with permission extension
- getBreadcrumbs() — Return additional breadcrumbs for this report. Useful when this report is a child of another.
- getCMSActions()
- getCMSFields() — Returns a FieldList with which to create the CMS editing form.
- getCount() — counts the number of objects returned
- getLink()
- getReportField() — Return a field, such as a {@link GridField} that is used to show and manipulate data relating to this report.
- getTitle() — Allows access to title as a property
- get_excluded_reports() — Return an array of excluded reports. That is, reports that will not be included in the list of reports in report admin in the CMS.
- get_reports() — Return the SS_Report objects making up the given list.
- records() — Return a SS_List records for this report.
- sourceQuery() — Return the {@link DataQuery} that provides your report data.
- title() — Return the title of this report.