aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-11-01 14:49:02 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-11-01 14:49:02 +0100
commite0597476d1d5f6a4a7d6ea9b76966465f3d22fb8 (patch)
tree65c1ffe6906e9faacca5cbbf814f762d9013551d /src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php
parentaedd6ca0fd212abd07ec59c5fd58ea2ca99198c5 (diff)
downloadwallabag-e0597476d1d5f6a4a7d6ea9b76966465f3d22fb8.tar.gz
wallabag-e0597476d1d5f6a4a7d6ea9b76966465f3d22fb8.tar.zst
wallabag-e0597476d1d5f6a4a7d6ea9b76966465f3d22fb8.zip
Use custom event instead of Doctrine ones
This give us ability to use Entry ID to determine where to store images and it’s then more easy to remove them when we remove the entry.
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php')
-rw-r--r--src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php
new file mode 100644
index 00000000..e9061d04
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php
@@ -0,0 +1,26 @@
1<?php
2
3namespace Wallabag\CoreBundle\Event;
4
5use Symfony\Component\EventDispatcher\Event;
6use Wallabag\CoreBundle\Entity\Entry;
7
8/**
9 * This event is fired as soon as an entry is deleted.
10 */
11class EntryDeletedEvent extends Event
12{
13 const NAME = 'entry.deleted';
14
15 protected $entry;
16
17 public function __construct(Entry $entry)
18 {
19 $this->entry = $entry;
20 }
21
22 public function getEntry()
23 {
24 return $this->entry;
25 }
26}