mirror of
https://github.com/flarum/core.git
synced 2025-10-13 07:54:25 +02:00
A good start I think, but still some work to do. If we go ahead with https://github.com/flarum/core/issues/132#issuecomment-117507974 (which I am in favour of), we can extract the entity-related stuff into some smaller service providers (e.g. discussion repo, an event listener, permissions, and gambits stuff could all go in Flarum\Core\Discussions\DiscussionsServiceProvider).
19 lines
374 B
PHP
19 lines
374 B
PHP
<?php namespace Flarum\Extend;
|
|
|
|
use Illuminate\Contracts\Container\Container;
|
|
|
|
class DiscussionGambit implements ExtenderInterface
|
|
{
|
|
protected $class;
|
|
|
|
public function __construct($class)
|
|
{
|
|
$this->class = $class;
|
|
}
|
|
|
|
public function extend(Container $container)
|
|
{
|
|
$container->make('flarum.discussionGambits')[] = $this->class;
|
|
}
|
|
}
|