diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/RecommendedEntryEvent.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/RecommendedEntryEvent.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/RecommendedEntryEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/RecommendedEntryEvent.php new file mode 100644 index 00000000..998b56d5 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Federation/RecommendedEntryEvent.php | |||
@@ -0,0 +1,43 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Federation; | ||
4 | |||
5 | use Symfony\Component\EventDispatcher\Event; | ||
6 | use Wallabag\CoreBundle\Entity\Entry; | ||
7 | |||
8 | /** | ||
9 | * This event is fired as soon as an entry was recommended. | ||
10 | */ | ||
11 | class RecommendedEntryEvent extends Event | ||
12 | { | ||
13 | const NAME = 'federation.recommend'; | ||
14 | |||
15 | protected $entry; | ||
16 | |||
17 | /** | ||
18 | * FederationEvent constructor. | ||
19 | * @param Entry $entry | ||
20 | */ | ||
21 | public function __construct(Entry $entry) | ||
22 | { | ||
23 | $this->entry = $entry; | ||
24 | } | ||
25 | |||
26 | /** | ||
27 | * @return Entry | ||
28 | */ | ||
29 | public function getEntry() | ||
30 | { | ||
31 | return $this->entry; | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * @param Entry $entry | ||
36 | * @return RecommendedEntryEvent | ||
37 | */ | ||
38 | public function setEntry(Entry $entry) | ||
39 | { | ||
40 | $this->entry = $entry; | ||
41 | return $this; | ||
42 | } | ||
43 | } | ||