Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function getEditForm($id = null, $fields = null) |
||
19 | { |
||
20 | /** @var CMSForm $form */ |
||
21 | $form = parent::getEditForm($id, $fields); |
||
22 | |||
23 | // See parent class |
||
24 | $gridFieldName = $this->sanitiseClassName($this->modelClass); |
||
25 | |||
26 | $gridFieldConfig = $form->Fields()->fieldByName($gridFieldName)->getConfig(); |
||
27 | $gridFieldConfig->removeComponentsByType('GridFieldAddNewButton'); |
||
28 | $gridFieldConfig->addComponent(new DMSGridFieldAddNewButton('buttons-before-left'), 'GridFieldExportButton'); |
||
29 | |||
30 | return $form; |
||
31 | } |
||
32 | } |
||
33 |
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.