mirror of
https://github.com/flarum/core.git
synced 2025-08-05 16:07:34 +02:00
Deprecate GetModelIsPrivate and its usages
This commit is contained in:
@@ -110,6 +110,10 @@ class Discussion extends AbstractModel
|
||||
Notification::whereSubject($discussion)->delete();
|
||||
});
|
||||
|
||||
/**
|
||||
* @deprecated beta 15, remove beta 16
|
||||
* When needed, the `Flarum\Discussion\Event\Saving` event should be listened to directly.
|
||||
*/
|
||||
static::saving(function (self $discussion) {
|
||||
$event = new GetModelIsPrivate($discussion);
|
||||
|
||||
|
@@ -13,6 +13,9 @@ use Flarum\Database\AbstractModel;
|
||||
|
||||
/**
|
||||
* Determine whether or not a model should be marked as `is_private`.
|
||||
*
|
||||
* @deprecated beta 15, remove beta 16
|
||||
* When needed, the `Flarum\Discussion\Event\Saving` event should be listened to directly.
|
||||
*/
|
||||
class GetModelIsPrivate
|
||||
{
|
||||
|
@@ -96,6 +96,10 @@ class Post extends AbstractModel
|
||||
$post->discussion->save();
|
||||
});
|
||||
|
||||
/**
|
||||
* @deprecated beta 15, remove beta 16
|
||||
* When needed, the `Flarum\Discussion\Event\Saving` event should be listened to directly.
|
||||
*/
|
||||
static::saving(function (self $post) {
|
||||
$event = new GetModelIsPrivate($post);
|
||||
|
||||
|
Reference in New Issue
Block a user