Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function updateItemEditForm($form) { |
||
16 | parent::updateItemEditForm($form); |
||
17 | $actions = $form->Actions(); |
||
18 | if (!$this->owner->record->canDelete()) { |
||
19 | $actions->removeByName('action_doDelete'); |
||
20 | $actions->removeByName('action_cancelDelete'); |
||
21 | $actions->removeByName('action_unpublish'); |
||
22 | } |
||
23 | } |
||
24 | } |
||
25 |
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.