mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
8dd644d25d
Namespace all templates Move difflib and BBCodeParser2 to thirdparty Remove deprecated API marked for removal in 4.0
26 lines
606 B
PHP
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)
|
|
);
|
|
}
|
|
}
|