| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 72 | public function getEditForm($id = null, $fields = null) |
||
| 73 | { |
||
| 74 | $form = parent::getEditForm($id, $fields); |
||
| 75 | $class = $this->sanitiseClassName($this->modelClass); |
||
| 76 | if ($class == 'Location') { |
||
| 77 | $gridField = $form->Fields()->fieldByName($class); |
||
| 78 | $config = $gridField->getConfig(); |
||
| 79 | $config->removeComponentsByType('GridFieldDeleteAction'); |
||
| 80 | } |
||
| 81 | return $form; |
||
| 82 | } |
||
| 84 |