silverstripe-framework/Forms/GridField/GridFieldToolbarHeader.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

26 lines
606 B
PHP

<?php
namespace SilverStripe\Forms\GridField;
use SilverStripe\View\SSViewer;
/**
* Adding this class to a {@link GridFieldConfig} of a {@link GridField} adds
* a header title to that field.
*
* The header serves to display the name of the data the GridField is showing.
*/
class GridFieldToolbarHeader implements GridField_HTMLProvider {
/**
* @param GridField $gridField
* @return array
*/
public function getHTMLFragments($gridField) {
$templates = SSViewer::get_templates_by_class($this, '', __CLASS__);
return array(
'header' => $gridField->renderWith($templates)
);
}
}