Update index.md

Updated doc to use "::class" instead of Literals to reflect SS4 changes
This commit is contained in:
chromos33 2020-12-23 11:26:38 +01:00 committed by GitHub
parent d671788b19
commit d6357ec187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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.
```php
$grid->getConfig()->getComponentByType('GridFieldEditableColumns')->setDisplayFields(array(
$grid->getConfig()->getComponentByType(GridFieldEditableColumns::class)->setDisplayFields(array(
'FirstField' => function($record, $column, $grid) {
return new TextField($column);
},
'SecondField' => array(
'title' => 'Custom Title',
'field' => 'ReadonlyField'
'field' => ReadonlyField::class
),
'ThirdField' => array(
'title' => 'Custom Title Two',