Version: current

# Class SS_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 `SS_ReportWrapper::beforeQuery()` and `SS_ReportWrapper::afterQuery()`

  Object
  ViewableData implements IteratorAggregate
  SS_Report
  SS_ReportWrapper

### Direct known subclasses

`SideReportWrapper`, `SubsiteReportWrapper`

Abstract
Package: cms\reports
Located at cms/code/Report.php

## Methods summary

`public` | # `__construct( mixed $baseReport )` #### Overrides `Object::__construct`
`public string` | # `ID( )` Return the ID of this Report class. Because it doesn't have a number, we use the class name as the ID. Return the ID of this Report class. Because it doesn't have a number, we use the class name as the ID. #### Returns `string` string #### Overrides `SS_Report::ID`
`public` | # `parameterFields( )` Return a FieldSet specifying the search criteria for this report. Return a FieldSet specifying the search criteria for this report. Override this method to define search criteria. #### Overrides `SS_Report::parameterFields`
`public` | # `columns( )` Return an map of columns for your report. - The map keys will be the source columns for your report (in TableListField dot syntax) - The values can either be a string (the column title), or a map containing the following column parameters: - title: The column title - formatting: A formatting string passed to `TableListField::setFieldFormatting()` Return an map of columns for your report. - The map keys will be the source columns for your report (in TableListField dot syntax) - The values can either be a string (the column title), or a map containing the following column parameters: - title: The column title - formatting: A formatting string passed to `TableListField::setFieldFormatting()` #### Overrides `SS_Report::columns`
`public` | # `beforeQuery( mixed $params )` Override this method to perform some actions prior to querying. Override this method to perform some actions prior to querying.
`public` | # `afterQuery( )` Override this method to perform some actions after querying. Override this method to perform some actions after querying.
`public` | # `sourceQuery( mixed $params )` Return the `SQLQuery` that provides your report data. Return the `SQLQuery` that provides your report data. #### Overrides `SS_Report::sourceQuery`
`public` | # `sourceRecords( mixed $params = array(), mixed $sort = null, mixed $limit = null )`
`public` | # `title( )` Return the title of this report. Return the title of this report. You have two ways of specifying the description: - overriding description(), which lets you support i18n - defining the $description property #### Overrides `SS_Report::title`
`public` | # `group( )`
`public` | # `sort( )`
`public` | # `description( )` Return the description of this report. Return the description of this report. You have two ways of specifying the description: - overriding description(), which lets you support i18n - defining the $description property #### Overrides `SS_Report::description`
`public boolean` | # `canView( `Member` $member = NULL )` #### Parameters $member Member $member #### Returns `boolean` boolean #### Overrides `SS_Report::canView`

### Methods inherited from SS_Report

`TreeTitle()`, `count()`, `dataClass()`, `getCMSActions()`, `getCMSFields()`, `getReportField()`, `get_reports()`, `records()`, `register()`, `sortColumns()`, `unregister()`

### 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()`, `__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 mixed` | $baseReport | #

### Properties inherited from SS_Report

`$dataClass`, `$description`, `$title`

### Properties inherited from ViewableData

`$casting`, `$customisedObject`, `$default_cast`, `$failover`, `$iteratorPos`, `$iteratorTotalItems`

### Properties inherited from Object

`$class`, `$extension_instances`, `$extensions`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -