Merge pull request #220 from christopherdarling/patch-1

DOCS fix removeComponentsByType example
This commit is contained in:
Robbie Averill 2017-11-08 12:43:44 +13:00 committed by GitHub
commit da67666c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
``` ```