diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-30 11:51:08 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-30 11:54:31 +0200 |
commit | 852273cae28d59a2db47f2a17ea20138ecfdb1ed (patch) | |
tree | 8a10d3da08afaf04a30dffaa9e559085829e0b2a | |
parent | 61351218f90df455c6edcc530bfc746d60b43a12 (diff) | |
download | wallabag-save-changes.tar.gz wallabag-save-changes.tar.zst wallabag-save-changes.zip |
Re-add one missing eventsave-changes
-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(); |