Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
29 | public function getEditForm($id = null, $fields = null) { |
||
30 | $form = parent::getEditForm($id, $fields); |
||
31 | $gridField = $form->Fields()->dataFieldByName('DNProject'); |
||
32 | if($gridField) { |
||
33 | $gridField->getConfig() |
||
34 | ->removeComponentsByType('GridFieldExportButton') |
||
35 | ->removeComponentsByType('GridFieldPrintButton') |
||
36 | ->removeComponentsByType('GridFieldAddNewButton') |
||
37 | ->addComponent(new GridFieldAddNewMultiClass('buttons-before-left')) |
||
38 | ->addComponent(new GridFieldExportButton('buttons-before-right')) |
||
39 | ->addComponent(new GridFieldPrintButton('buttons-before-right')); |
||
40 | } |
||
41 | return $form; |
||
42 | } |
||
43 | |||
45 |