| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function deleteVideoFromDatabase(VideoEvent $event) |
||
| 17 | { |
||
| 18 | $video = $event->getEntity(); |
||
| 19 | |||
| 20 | $trick = $event->getTrick(); |
||
| 21 | |||
| 22 | $trick->removeVideo($video); |
||
| 23 | $this->em->persist($trick); |
||
| 24 | $this->em->flush(); |
||
| 25 | |||
| 26 | $this->addFlash(FlashMessageCategory::SUCCESS, 'Video '. $video->getTitle() .' deleted'); |
||
| 27 | } |
||
| 38 | } |