mirror of
https://github.com/flarum/framework.git
synced 2025-04-29 16:14:04 +08:00
Make listener methods static
This is needed since we're listening to the individual methods of the class, as opposed to registering the class as a subscriber.
This commit is contained in:
parent
ea55ceeacb
commit
2712afc81e
@ -20,7 +20,7 @@ class CreatePostWhenDiscussionIsStickied
|
|||||||
/**
|
/**
|
||||||
* @param DiscussionWasStickied $event
|
* @param DiscussionWasStickied $event
|
||||||
*/
|
*/
|
||||||
public function whenDiscussionWasStickied(DiscussionWasStickied $event)
|
public static function whenDiscussionWasStickied(DiscussionWasStickied $event)
|
||||||
{
|
{
|
||||||
static::stickyChanged($event->discussion, $event->user, true);
|
static::stickyChanged($event->discussion, $event->user, true);
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ class CreatePostWhenDiscussionIsStickied
|
|||||||
/**
|
/**
|
||||||
* @param DiscussionWasUnstickied $event
|
* @param DiscussionWasUnstickied $event
|
||||||
*/
|
*/
|
||||||
public function whenDiscussionWasUnstickied(DiscussionWasUnstickied $event)
|
public static function whenDiscussionWasUnstickied(DiscussionWasUnstickied $event)
|
||||||
{
|
{
|
||||||
static::stickyChanged($event->discussion, $event->user, false);
|
static::stickyChanged($event->discussion, $event->user, false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user