mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Update index.md
Updated doc to use "::class" instead of Literals to reflect SS4 changes
This commit is contained in:
parent
d671788b19
commit
d6357ec187
@ -37,13 +37,13 @@ You can customise the form fields that are used in the grid by calling `setDispl
|
|||||||
inline editing component. By default field scaffolding will be used.
|
inline editing component. By default field scaffolding will be used.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$grid->getConfig()->getComponentByType('GridFieldEditableColumns')->setDisplayFields(array(
|
$grid->getConfig()->getComponentByType(GridFieldEditableColumns::class)->setDisplayFields(array(
|
||||||
'FirstField' => function($record, $column, $grid) {
|
'FirstField' => function($record, $column, $grid) {
|
||||||
return new TextField($column);
|
return new TextField($column);
|
||||||
},
|
},
|
||||||
'SecondField' => array(
|
'SecondField' => array(
|
||||||
'title' => 'Custom Title',
|
'title' => 'Custom Title',
|
||||||
'field' => 'ReadonlyField'
|
'field' => ReadonlyField::class
|
||||||
),
|
),
|
||||||
'ThirdField' => array(
|
'ThirdField' => array(
|
||||||
'title' => 'Custom Title Two',
|
'title' => 'Custom Title Two',
|
||||||
|
Loading…
Reference in New Issue
Block a user