diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-05-31 09:31:18 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-23 10:08:54 +0200 |
commit | bf6c0346d8d35a719dd1bff1cb4d573d422f99ff (patch) | |
tree | 04fb80e20ad1cffacb72357a632a9afe2ec058cb /src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation | |
parent | d6d3f4ec3698effd1d4b063e295341791bdcf7d7 (diff) | |
download | wallabag-federation.tar.gz wallabag-federation.tar.zst wallabag-federation.zip |
WIPfederation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation')
4 files changed, 63 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationCreatedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationCreatedEvent.php new file mode 100644 index 00000000..b3667703 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationCreatedEvent.php | |||
@@ -0,0 +1,8 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Annotation; | ||
4 | |||
5 | class AnnotationCreatedEvent extends AnnotationEvent | ||
6 | { | ||
7 | const NAME = 'annotation.created'; | ||
8 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationDeletedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationDeletedEvent.php new file mode 100644 index 00000000..60d53849 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationDeletedEvent.php | |||
@@ -0,0 +1,8 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Annotation; | ||
4 | |||
5 | class AnnotationDeletedEvent extends AnnotationEvent | ||
6 | { | ||
7 | const NAME = 'annotation.deleted'; | ||
8 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEditedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEditedEvent.php new file mode 100644 index 00000000..385b8025 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEditedEvent.php | |||
@@ -0,0 +1,8 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Annotation; | ||
4 | |||
5 | class AnnotationEditedEvent extends AnnotationEvent | ||
6 | { | ||
7 | const NAME = 'annotation.edited'; | ||
8 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEvent.php new file mode 100644 index 00000000..b4cb93af --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Annotation/AnnotationEvent.php | |||
@@ -0,0 +1,39 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Annotation; | ||
4 | |||
5 | use Symfony\Component\EventDispatcher\Event; | ||
6 | use Wallabag\AnnotationBundle\Entity\Annotation; | ||
7 | |||
8 | /** | ||
9 | * This event is fired when annotation-relative stuff is made. | ||
10 | */ | ||
11 | abstract class AnnotationEvent extends Event | ||
12 | { | ||
13 | protected $annotation; | ||
14 | |||
15 | /** | ||
16 | * AnnotationEvent constructor. | ||
17 | * @param Annotation $annotation | ||
18 | */ | ||
19 | public function __construct(Annotation $annotation) | ||
20 | { | ||
21 | $this->annotation = $annotation; | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * @return Annotation | ||
26 | */ | ||
27 | public function getAnnotation() | ||
28 | { | ||
29 | return $this->annotation; | ||
30 | } | ||
31 | |||
32 | /** | ||
33 | * @param Annotation $annotation | ||
34 | */ | ||
35 | public function setAnnotation(Annotation $annotation) | ||
36 | { | ||
37 | $this->annotation = $annotation; | ||
38 | } | ||
39 | } | ||