class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionProvider, GridField_URLHandler

Adds an "Print" button to the bottom or top of a GridField.

Methods

__construct(string $targetFragment = "after", array $printColumns = null)

No description

array
getHTMLFragments($gridField)

Place the print button in a

<

p> tag below the field

Array
getActions(GridField $gridField)

Print is an action button.

handleAction(GridField $gridField, String $actionName, Array $arguments, Array $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

array
getTitle(GridField $gridField)

Return the title of the printed page

generatePrintData(GridField $gridField)

Export core.

array
getPrintColumns()

No description

setPrintColumns(array $cols)

No description

boolean
getPrintHasHeader()

No description

setPrintHasHeader(boolean $bool)

No description

Details

at line 35
__construct(string $targetFragment = "after", array $printColumns = null)

Parameters

string $targetFragment The HTML fragment to write the button into
array $printColumns The columns to include in the print view

at line 47
array getHTMLFragments($gridField)

Place the print button in a

<

p> tag below the field

Parameters

$gridField

Return Value

array

at line 71
Array getActions(GridField $gridField)

Print is an action button.

Parameters

GridField $gridField

Return Value

Array with action identifier strings.

at line 83
handleAction(GridField $gridField, String $actionName, Array $arguments, Array $data)

Handle the print action.

Parameters

GridField $gridField
String $actionName Action identifier, see {@link getActions()}.
Array $arguments Arguments relevant for this
Array $data All form data

at line 95
getURLHandlers($gridField)

Print is accessible via the url

Parameters

$gridField

at line 104
handlePrint($gridField, $request = null)

Handle the print, for both the action button and the URL

Parameters

$gridField
$request

at line 140
array getTitle(GridField $gridField)

Return the title of the printed page

Parameters

GridField $gridField

Return Value

array

at line 171
generatePrintData(GridField $gridField)

Export core.

Parameters

GridField $gridField

at line 226
array getPrintColumns()

Return Value

array

at line 233
setPrintColumns(array $cols)

Parameters

array $cols

at line 242
boolean getPrintHasHeader()

Return Value

boolean

at line 249
setPrintHasHeader(boolean $bool)

Parameters

boolean $bool