class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionProvider, GridField_URLHandler (View source)

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

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

array
getTitle(GridField $gridField)

Return the title of the printed page

generatePrintData(GridField $gridField)

Export core.

array
getPrintColumns()

No description

setPrintColumns($cols)

No description

bool
getPrintHasHeader()

No description

setPrintHasHeader($bool)

No description

Details

__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

array getHTMLFragments($gridField)

Place the print button in a

tag below the field

Parameters

$gridField

Return Value

array

array getActions($gridField)

Print is an action button.

Parameters

$gridField

Return Value

array

with action identifier strings.

handleAction(GridField $gridField, $actionName, $arguments, $data)

Handle the print action.

Parameters

GridField $gridField
$actionName
$arguments
$data

getURLHandlers($gridField)

Print is accessible via the url

Parameters

$gridField

handlePrint($gridField, $request = null)

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

Parameters

$gridField
$request

array getTitle(GridField $gridField)

Return the title of the printed page

Parameters

GridField $gridField

Return Value

array

generatePrintData(GridField $gridField)

Export core.

Parameters

GridField $gridField

array getPrintColumns()

Return Value

array

setPrintColumns($cols)

Parameters

$cols

bool getPrintHasHeader()

Return Value

bool

setPrintHasHeader($bool)

Parameters

$bool