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/User | |
parent | d6d3f4ec3698effd1d4b063e295341791bdcf7d7 (diff) | |
download | wallabag-bf6c0346d8d35a719dd1bff1cb4d573d422f99ff.tar.gz wallabag-bf6c0346d8d35a719dd1bff1cb4d573d422f99ff.tar.zst wallabag-bf6c0346d8d35a719dd1bff1cb4d573d422f99ff.zip |
WIPfederation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/CoreBundle/Event/Activity/Actions/User')
3 files changed, 57 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserDeletedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserDeletedEvent.php new file mode 100644 index 00000000..df06db8c --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserDeletedEvent.php | |||
@@ -0,0 +1,8 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\User; | ||
4 | |||
5 | class UserDeletedEvent extends UserEvent | ||
6 | { | ||
7 | const NAME = 'user.deleted'; | ||
8 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserEditedEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserEditedEvent.php new file mode 100644 index 00000000..27f8f2d5 --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserEditedEvent.php | |||
@@ -0,0 +1,8 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\User; | ||
4 | |||
5 | class UserEditedEvent extends UserEvent | ||
6 | { | ||
7 | const NAME = 'user.edited'; | ||
8 | } | ||
diff --git a/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserEvent.php b/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserEvent.php new file mode 100644 index 00000000..e3807abf --- /dev/null +++ b/src/Wallabag/CoreBundle/Event/Activity/Actions/User/UserEvent.php | |||
@@ -0,0 +1,41 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Event\Activity\Actions\User; | ||
4 | |||
5 | use Symfony\Component\EventDispatcher\Event; | ||
6 | use Wallabag\UserBundle\Entity\User; | ||
7 | |||
8 | /** | ||
9 | * This event is fired when user-related stuff is made. | ||
10 | */ | ||
11 | abstract class UserEvent extends Event | ||
12 | { | ||
13 | protected $user; | ||
14 | |||
15 | /** | ||
16 | * UserEvent constructor. | ||
17 | * @param User $user | ||
18 | */ | ||
19 | public function __construct(User $user) | ||
20 | { | ||
21 | $this->user = $user; | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * @return User | ||
26 | */ | ||
27 | public function getUser() | ||
28 | { | ||
29 | return $this->user; | ||
30 | } | ||
31 | |||
32 | /** | ||
33 | * @param User $user | ||
34 | * @return UserEvent | ||
35 | */ | ||
36 | public function setUser(User $user) | ||
37 | { | ||
38 | $this->user = $user; | ||
39 | return $this; | ||
40 | } | ||
41 | } | ||