\SS_Report_FakeQuery
This is an object that can be used to dress up a more complex querying mechanism in the clothing of a SQLQuery object. This means that you can inject it into a TableListField.
Use it like this:
function sourceQuery($params) {
return new SS_Report_FakeQuery($this, 'sourceRecords', $params)
}
function sourceRecords($params, $sort, $limit) {
// Do some stuff
// Return a DataObjectSet of actual objects.
}
This object is used by the default implementation of sourceQuery() on SS_Report, to make use of
a sourceReords() method if one exists.
Synopsis
class SS_Report_FakeQuery
extends SQLQuery
{
- // methods
- public void __construct()
- public void setSortColumnMethod()
- public void limit()
- public void unlimitedRowCount()
- public void execute()
- public void canSortBy()
Hierarchy
Extends
- SQLQuery
Members
protected
- $obj
public
- $limit
- $orderby
Methods
public
- __construct()
- canSortBy()
- execute()
- limit()
- setSortColumnMethod() — Provide a method that will return a list of columns that can be used to sort.
- unlimitedRowCount()