Class SS_Report
Base "abstract" class creating reports on your data.
Creating reports
Creating a new report is a matter overloading a few key methods
SS_Report::title(): Return the title - i18n is your responsibility SS_Report::description(): Return the description - i18n is your responsibility SS_Report::sourceQuery(): Return a DataObjectSet of the search results SS_Report::columns():
Return information about the columns in this report. SS_Report::parameterFields():
Return a FieldSet of the fields that can be used to filter this report.
If you can't express your report as a query, you can implement the this
method instead:
// Return an array of fields that can be used to sort the data public function
sourceRecords($params, $sort, $limit) { ... }
The $sort value will be set to the corresponding key of the columns() array.
If you wish to make only a subset of the columns sortable, then you can override
sortColumns() to return a subset of the array keys.
Note that this implementation is less efficient and should only be used when necessary.
If you wish to modify the report in more extreme ways, you could overload these methods instead.
SS_Report::getReportField(): Return a FormField in the place where your report's
TableListField usually appears. SS_Report::getCMSFields(): Return the FieldSet
representing the complete right-hand area of the report, including the title,
description, parameter fields, and results.
Showing reports to the user
Right now, all subclasses of SS_Report will be shown in the ReportAdmin. However, we are planning on adding an explicit registration mechanism, so that you can decide which reports go in the report admin, and which go elsewhere (such as the side panel in the CMS).
- Object
-
ViewableData
implements
IteratorAggregate
-
SS_Report
Direct known subclasses
BigFilesReport,
BrokenLinksReport,
SS_ReportWrapper,
NonUsedFilesReport,
SideReport_BrokenFiles,
SideReport_BrokenLinks,
SideReport_BrokenRedirectorPages,
SideReport_BrokenVirtualPages,
SideReport_EmptyPages,
SideReport_RecentlyEdited,
SideReport_ToDo
Indirect known subclasses
Methods summary
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
columns( )
Return an map of columns for your report. |
public
|
|
public
|
|
public
|
|
public
|
#
getCMSFields( )
Returns a FieldSet with which to create the CMS editing form. You can use the extend() method of FieldSet to create customised forms for your other data objects. |
public
|
|
public
|
#
getReportField( )
Return a field, such as a |
public
boolean
|
|
public
string
|
|
public
string
|
|
public static
|
|
public static
|
|
public static
An
|
Methods inherited from ViewableData
ATT_val(),
BaseHref(),
CSSClasses(),
ColumnBreak(),
ColumnCalc(),
ColumnNumber(),
ColumnPad(),
ColumnPos(),
CurrentMember(),
CurrentPage(),
Debug(),
Even(),
EvenOdd(),
First(),
FirstLast(),
HasPerm(),
IsAjax(),
JS_val(),
Last(),
Me(),
Middle(),
MiddleString(),
Modulus(),
MultipleOf(),
Odd(),
Pos(),
RAW_val(),
SQL_val(),
ThemeDir(),
ThemeName(),
Top(),
TotalItems(),
XML_val(),
__get(),
__isset(),
__set(),
buildCastingCache(),
cachedCall(),
castingClass(),
castingHelper(),
castingHelperPair(),
castingObjectCreator(),
castingObjectCreatorPair(),
customise(),
defineMethods(),
escapeTypeForField(),
getField(),
getIterator(),
getSecurityID(),
getXMLValues(),
hasField(),
hasValue(),
i18nLocale(),
iteratorProperties(),
obj(),
renderWith(),
setCustomisedObj(),
setField()
Methods inherited from Object
__call(),
__construct(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
createMethod(),
create_from_string(),
exists(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
protected
string
|
$title |
#
This is the title of the report, used by the ReportAdmin templates. |
protected
string
|
$description |
#
This is a description about what this report does. Used by the ReportAdmin templates. |
protected
string
|
$dataClass |
#
The class of object being managed by this report. Set by overriding in your subclass. |
Properties inherited from ViewableData
$casting,
$customisedObject,
$default_cast,
$failover,
$iteratorPos,
$iteratorTotalItems