mirror of
https://github.com/flarum/core.git
synced 2025-10-11 23:14:29 +02:00
Added post extender with type method, deprecated ConfigurePostTypes (#2101)
This commit is contained in:
committed by
GitHub
parent
5842dd1200
commit
cee87848fe
@@ -21,19 +21,20 @@ class PostServiceProvider extends AbstractServiceProvider
|
||||
{
|
||||
CommentPost::setFormatter($this->app->make('flarum.formatter'));
|
||||
|
||||
$this->registerPostTypes();
|
||||
$this->setPostTypes();
|
||||
|
||||
$events = $this->app->make('events');
|
||||
$events->subscribe(PostPolicy::class);
|
||||
}
|
||||
|
||||
public function registerPostTypes()
|
||||
protected function setPostTypes()
|
||||
{
|
||||
$models = [
|
||||
CommentPost::class,
|
||||
DiscussionRenamedPost::class
|
||||
];
|
||||
|
||||
// Deprecated in beta 15, remove in beta 16.
|
||||
$this->app->make('events')->dispatch(
|
||||
new ConfigurePostTypes($models)
|
||||
);
|
||||
|
Reference in New Issue
Block a user