1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 18:26:07 +02:00

Deprecate GetModelIsPrivate, replace with extender (#2587)

This commit is contained in:
Alexander Skvortsov
2021-02-04 10:56:10 -05:00
committed by GitHub
parent 17f15e36eb
commit 8366ec720e
6 changed files with 236 additions and 14 deletions

View File

@@ -17,7 +17,6 @@ use Flarum\Discussion\Event\Hidden;
use Flarum\Discussion\Event\Renamed;
use Flarum\Discussion\Event\Restored;
use Flarum\Discussion\Event\Started;
use Flarum\Event\GetModelIsPrivate;
use Flarum\Foundation\EventGeneratorTrait;
use Flarum\Notification\Notification;
use Flarum\Post\MergeableInterface;
@@ -109,12 +108,6 @@ class Discussion extends AbstractModel
Notification::whereSubject($discussion)->delete();
});
static::saving(function (self $discussion) {
$event = new GetModelIsPrivate($discussion);
$discussion->is_private = static::$dispatcher->until($event) === true;
});
}
/**