diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 2a287825..b6afe129 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -15,6 +15,7 @@ use Wallabag\CoreBundle\Form\Type\EditEntryType; | |||
15 | use Wallabag\CoreBundle\Form\Type\NewEntryType; | 15 | use Wallabag\CoreBundle\Form\Type\NewEntryType; |
16 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; | 16 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; |
17 | use Wallabag\CoreBundle\Event\EntrySavedEvent; | 17 | use Wallabag\CoreBundle\Event\EntrySavedEvent; |
18 | use Wallabag\CoreBundle\Event\EntryDeletedEvent; | ||
18 | use Wallabag\CoreBundle\Form\Type\SearchEntryType; | 19 | use Wallabag\CoreBundle\Form\Type\SearchEntryType; |
19 | 20 | ||
20 | class EntryController extends Controller | 21 | class EntryController extends Controller |
@@ -486,6 +487,9 @@ class EntryController extends Controller | |||
486 | UrlGeneratorInterface::ABSOLUTE_PATH | 487 | UrlGeneratorInterface::ABSOLUTE_PATH |
487 | ); | 488 | ); |
488 | 489 | ||
490 | // entry deleted, dispatch event about it! | ||
491 | $this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry)); | ||
492 | |||
489 | $em = $this->getDoctrine()->getManager(); | 493 | $em = $this->getDoctrine()->getManager(); |
490 | $em->remove($entry); | 494 | $em->remove($entry); |
491 | $em->flush(); | 495 | $em->flush(); |