DOCS fix removeComponentsByType example

missing namespace
This commit is contained in:
Christopher Darling 2017-11-03 14:54:27 +00:00 committed by Daniel Hensby
parent 40ed8c7f49
commit d5960b5efb
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
1 changed files with 3 additions and 1 deletions

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.
```php
use SilverStripe\Forms\GridField\GridFieldAddNewButton;
$grid->getConfig()
->removeComponentsByType('GridFieldAddNewButton')
->removeComponentsByType(GridFieldAddNewButton::class)
->addComponent(new GridFieldAddNewMultiClass());
```