Merge pull request #8760 from creative-commoners/pulls/4.0/print-gridfield-template

FIX GridFieldPrintButton no longer assumes that children of GridField would implement their own print template
This commit is contained in:
Robbie Averill 2019-01-29 09:27:49 +02:00 committed by GitHub
commit 5f69063d4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,10 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
$this->extend('updatePrintData', $data); $this->extend('updatePrintData', $data);
if ($data) { if ($data) {
return $data->renderWith(get_class($gridField) . "_print"); return $data->renderWith([
get_class($gridField) . '_print',
GridField::class . '_print',
]);
} }
return null; return null;