mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Deprecate GetModelIsPrivate and its usages
This commit is contained in:
@@ -110,6 +110,10 @@ class Discussion extends AbstractModel
|
|||||||
Notification::whereSubject($discussion)->delete();
|
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) {
|
static::saving(function (self $discussion) {
|
||||||
$event = new GetModelIsPrivate($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`.
|
* 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
|
class GetModelIsPrivate
|
||||||
{
|
{
|
||||||
|
@@ -96,6 +96,10 @@ class Post extends AbstractModel
|
|||||||
$post->discussion->save();
|
$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) {
|
static::saving(function (self $post) {
|
||||||
$event = new GetModelIsPrivate($post);
|
$event = new GetModelIsPrivate($post);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user