mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #220 from christopherdarling/patch-1
DOCS fix removeComponentsByType example
This commit is contained in:
commit
da67666c22
@ -65,8 +65,10 @@ a new record. By default it allows them to select the model class for the grid f
|
|||||||
subclasses. You can control the createable classes using the `setClasses` method.
|
subclasses. You can control the createable classes using the `setClasses` method.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
use SilverStripe\Forms\GridField\GridFieldAddNewButton;
|
||||||
|
|
||||||
$grid->getConfig()
|
$grid->getConfig()
|
||||||
->removeComponentsByType('GridFieldAddNewButton')
|
->removeComponentsByType(GridFieldAddNewButton::class)
|
||||||
->addComponent(new GridFieldAddNewMultiClass());
|
->addComponent(new GridFieldAddNewMultiClass());
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user