Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
32 | public function getEditForm($id = null, $fields = null) |
||
33 | { |
||
34 | $form = parent::getEditForm($id, $fields); |
||
35 | |||
36 | $gridFieldName = $this->sanitiseClassName($this->modelClass); |
||
37 | $gridField = $form->Fields()->fieldByName($gridFieldName); |
||
38 | |||
39 | // GridField configuration |
||
40 | $config = $gridField->getConfig(); |
||
41 | |||
42 | // remove edit icon |
||
43 | $config->removeComponentsByType('GridFieldEditButton'); |
||
44 | |||
45 | return $form; |
||
46 | } |
||
48 |