| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function hookItemDeleted(HookPortfolioItemDeletedEventInterface $hookEvent) |
||
| 13 | { |
||
| 14 | /** @var Portfolio $item */ |
||
| 15 | $item = $hookEvent->getEventData()['item']; |
||
| 16 | |||
| 17 | try { |
||
| 18 | $json = $this->doDeleteRequest($item->getId(), 'eportfolio'); |
||
| 19 | } catch (Exception $e) { |
||
| 20 | Display::addFlash( |
||
| 21 | Display::return_message($e->getMessage(), 'error') |
||
| 22 | ); |
||
| 23 | |||
| 24 | return; |
||
| 25 | } |
||
| 26 | |||
| 27 | if (empty($json)) { |
||
| 28 | return; |
||
| 29 | } |
||
| 30 | |||
| 31 | error_log('ExtNotifConn: Portfolio item deleted: Status '.((int) $json['status'])); |
||
| 32 | } |
||
| 34 |