| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 15 | public function getEditForm($id = null, $fields = null) { |
||
| 16 | $form = parent::getEditForm($id, $fields); |
||
| 17 | |||
| 18 | $grid = $form->Fields() |
||
| 19 | ->dataFieldByName($this->sanitiseClassName($this->modelClass)); |
||
| 20 | |||
| 21 | $grid->getConfig()->removeComponentsByType('GridFieldAddNewButton'); |
||
| 22 | |||
| 23 | return $form; |
||
| 24 | } |
||
| 25 | } |
||
| 26 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.