mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-26 14:39:25 +02:00
* ENH Make all GridField components injectable. Some components were already injectable, but all GridField components shipped in silverstripe should be injectable. This makes it a LOT easier to make global project-specific changes to a given component. The new AbstractGridFieldComponent also makes it easy to make similar wide-spread changes in the future. * DOCS Encourage injection for GridField and GridFieldComponents.
18 lines
324 B
PHP
18 lines
324 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Forms\GridField;
|
|
|
|
/**
|
|
* @see GridState
|
|
*/
|
|
class GridState_Component extends AbstractGridFieldComponent implements GridField_HTMLProvider
|
|
{
|
|
|
|
public function getHTMLFragments($gridField)
|
|
{
|
|
return [
|
|
'before' => $gridField->getState(false)->Field()
|
|
];
|
|
}
|
|
}
|