GridFieldPrintReportButton
class GridFieldPrintReportButton extends GridFieldPrintButton (View source)
An extension to GridFieldPrintButton to support printing custom Reports
This code was adapted from a solution posted in SilverStripe.org forums: http://www.silverstripe.org/customising-the-cms/show/38202
Properties
protected | array | $printColumns | from GridFieldPrintButton | |
protected | bool | $printHasHeader | from GridFieldPrintButton | |
protected | string | $targetFragment | Fragment to write the button to. |
from GridFieldPrintButton |
Methods
No description
Handle the print, for both the action button and the URL
Details
__construct(string $targetFragment = "after", array $printColumns = null)
No description
array
getHTMLFragments($gridField)
Place the print button in a
tag below the field
array
getActions($gridField)
Print is an action button.
handleAction(GridField $gridField, $actionName, $arguments, $data)
Handle the print action.
getURLHandlers($gridField)
Print is accessible via the url
handlePrint($gridField, $request = null)
Handle the print, for both the action button and the URL
protected array
getPrintColumnsForGridField(GridField $gridField)
Return the columns to print
array
getTitle(GridField $gridField)
Return the title of the printed page
generatePrintData(GridField $gridField)
Export core
Replaces definition in GridFieldPrintButton same as original except sources data from $gridField->getList() instead of $gridField->getManipulatedList()
array
getPrintColumns()
No description
setPrintColumns($cols)
No description
bool
getPrintHasHeader()
No description
setPrintHasHeader($bool)
No description