mirror of
https://github.com/flarum/core.git
synced 2025-05-20 22:30:44 +02:00
* Rename `app` helper to `resolve`, deprecate old version * Rename $this->app to $this->container in service providers We no longer couple Flarum\Foundation\Application to the Laravel container; instead, we use the container separately. Changing our naming to reflect that will make things clearer.
35 lines
803 B
PHP
35 lines
803 B
PHP
<?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\Discussion;
|
|
|
|
use Flarum\Discussion\Access\ScopeDiscussionVisibility;
|
|
use Flarum\Discussion\Event\Renamed;
|
|
use Flarum\Foundation\AbstractServiceProvider;
|
|
|
|
class DiscussionServiceProvider extends AbstractServiceProvider
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function boot()
|
|
{
|
|
$events = $this->container->make('events');
|
|
|
|
$events->subscribe(DiscussionMetadataUpdater::class);
|
|
|
|
$events->listen(
|
|
Renamed::class,
|
|
DiscussionRenamedLogger::class
|
|
);
|
|
|
|
Discussion::registerVisibilityScoper(new ScopeDiscussionVisibility(), 'view');
|
|
}
|
|
}
|