aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryRestController.php1
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
index 2cf562bc..808c4d7e 100644
--- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
@@ -14,6 +14,7 @@ use Wallabag\CoreBundle\Entity\Tag;
14use Wallabag\CoreBundle\Event\EntrySavedEvent; 14use Wallabag\CoreBundle\Event\EntrySavedEvent;
15use Wallabag\CoreBundle\Event\EntryTaggedEvent; 15use Wallabag\CoreBundle\Event\EntryTaggedEvent;
16use Wallabag\CoreBundle\Event\EntryUpdatedEvent; 16use Wallabag\CoreBundle\Event\EntryUpdatedEvent;
17use Wallabag\CoreBundle\Event\EntryDeletedEvent;
17 18
18class EntryRestController extends WallabagRestController 19class EntryRestController extends WallabagRestController
19{ 20{
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;
15use Wallabag\CoreBundle\Form\Type\NewEntryType; 15use Wallabag\CoreBundle\Form\Type\NewEntryType;
16use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; 16use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
17use Wallabag\CoreBundle\Event\EntrySavedEvent; 17use Wallabag\CoreBundle\Event\EntrySavedEvent;
18use Wallabag\CoreBundle\Event\EntryDeletedEvent;
18use Wallabag\CoreBundle\Form\Type\SearchEntryType; 19use Wallabag\CoreBundle\Form\Type\SearchEntryType;
19 20
20class EntryController extends Controller 21class 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();