diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/Activity/Actions/Share')
5 files changed, 83 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareAcceptedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareAcceptedEvent.php new file mode 100644 index 00000000..e171ef04 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareAcceptedEvent.php | |||
@@ -0,0 +1,11 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Share; | ||
4 | |||
5 | /** | ||
6 | * This event is fired as soon as an share is accepted | ||
7 | */ | ||
8 | class ShareAcceptedEvent extends ShareEvent | ||
9 | { | ||
10 | const NAME = 'share.accepted'; | ||
11 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareCancelledEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareCancelledEvent.php new file mode 100644 index 00000000..26bee896 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareCancelledEvent.php | |||
@@ -0,0 +1,11 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Share; | ||
4 | |||
5 | /** | ||
6 | * This event is fired as soon as an share is cancelled | ||
7 | */ | ||
8 | class ShareCancelledEvent extends ShareEvent | ||
9 | { | ||
10 | const NAME = 'share.cancelled'; | ||
11 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareCreatedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareCreatedEvent.php new file mode 100644 index 00000000..c2cb72d8 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareCreatedEvent.php | |||
@@ -0,0 +1,11 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Share; | ||
4 | |||
5 | /** | ||
6 | * This event is fired as soon as a share is created. | ||
7 | */ | ||
8 | class ShareCreatedEvent extends ShareEvent | ||
9 | { | ||
10 | const NAME = 'share.created'; | ||
11 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareDeniedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareDeniedEvent.php new file mode 100644 index 00000000..fcdfd1ce --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareDeniedEvent.php | |||
@@ -0,0 +1,11 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Share; | ||
4 | |||
5 | /** | ||
6 | * This event is fired as soon as an share is denied | ||
7 | */ | ||
8 | class ShareDeniedEvent extends ShareEvent | ||
9 | { | ||
10 | const NAME = 'share.denied'; | ||
11 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareEvent.php new file mode 100644 index 00000000..0022a39f --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/Share/ShareEvent.php | |||
@@ -0,0 +1,39 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\Share; | ||
4 | |||
5 | use Symfony\Component\EventDispatcher\Event; | ||
6 | use Wallabag\CoreBundle\Entity\Share; | ||
7 | |||
8 | /** | ||
9 | * This event is fired when share-related stuff is made. | ||
10 | */ | ||
11 | abstract class ShareEvent extends Event | ||
12 | { | ||
13 | protected $share; | ||
14 | |||
15 | /** | ||
16 | * ShareEvent constructor. | ||
17 | * @param Share $share | ||
18 | */ | ||
19 | public function __construct(Share $share) | ||
20 | { | ||
21 | $this->share = $share; | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * @return Share | ||
26 | */ | ||
27 | public function getShare() | ||
28 | { | ||
29 | return $this->share; | ||
30 | } | ||
31 | |||
32 | /** | ||
33 | * @param Share $share | ||
34 | */ | ||
35 | public function setShare(Share $share) | ||
36 | { | ||
37 | $this->share = $share; | ||
38 | } | ||
39 | } | ||