diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/EntryRestController.php | 1 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 4 |
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; | |||
14 | use Wallabag\CoreBundle\Event\EntrySavedEvent; | 14 | use Wallabag\CoreBundle\Event\EntrySavedEvent; |
15 | use Wallabag\CoreBundle\Event\EntryTaggedEvent; | 15 | use Wallabag\CoreBundle\Event\EntryTaggedEvent; |
16 | use Wallabag\CoreBundle\Event\EntryUpdatedEvent; | 16 | use Wallabag\CoreBundle\Event\EntryUpdatedEvent; |
17 | use Wallabag\CoreBundle\Event\EntryDeletedEvent; | ||
17 | 18 | ||
18 | class EntryRestController extends WallabagRestController | 19 | class 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; | |||
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(); |