| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | protected function canRemoveFromWishList() |
||
| 47 | { |
||
| 48 | $request = Controller::curr()->getRequest(); |
||
| 49 | if ($request->param('Action') != 'view') { |
||
| 50 | return false; |
||
| 51 | } |
||
| 52 | |||
| 53 | $list = ProductWishList::get()->filter([ |
||
| 54 | 'URLSegment' => $request->param('ID'), |
||
| 55 | ])->first(); |
||
| 56 | |||
| 57 | if (!$list) { |
||
| 58 | return false; |
||
| 59 | } |
||
| 60 | |||
| 61 | return $list->canEdit(Security::getCurrentUser()); |
||
| 62 | } |
||
| 64 |