mirror of
https://github.com/flarum/core.git
synced 2025-05-04 06:34:45 +02:00
Remove deprecated post types event
This commit is contained in:
parent
e2335e867d
commit
a68e2b27a4
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* For detailed copyright and license information, please view the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Event;
|
||||
|
||||
/**
|
||||
* @deprecated in beta 15, remove in beta 16. Use the Post extender instead.
|
||||
*/
|
||||
class ConfigurePostTypes
|
||||
{
|
||||
private $models;
|
||||
|
||||
public function __construct(array &$models)
|
||||
{
|
||||
$this->models = &$models;
|
||||
}
|
||||
|
||||
public function add($class)
|
||||
{
|
||||
$this->models[] = $class;
|
||||
}
|
||||
}
|
@ -10,7 +10,6 @@
|
||||
namespace Flarum\Post;
|
||||
|
||||
use DateTime;
|
||||
use Flarum\Event\ConfigurePostTypes;
|
||||
use Flarum\Foundation\AbstractServiceProvider;
|
||||
use Flarum\Post\Access\ScopePostVisibility;
|
||||
|
||||
@ -61,11 +60,6 @@ class PostServiceProvider extends AbstractServiceProvider
|
||||
DiscussionRenamedPost::class
|
||||
];
|
||||
|
||||
// Deprecated in beta 15, remove in beta 16.
|
||||
$this->app->make('events')->dispatch(
|
||||
new ConfigurePostTypes($models)
|
||||
);
|
||||
|
||||
foreach ($models as $model) {
|
||||
Post::setModel($model::$type, $model);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user