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