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

New object-based extension APIs

This commit is contained in:
Toby Zerner
2015-05-17 10:19:54 +09:30
parent 8e6adb9be0
commit a577910d04
15 changed files with 322 additions and 81 deletions

View File

@@ -4,6 +4,7 @@ use Flarum\Support\ServiceProvider;
use Flarum\Core\Models\User;
use Flarum\Core\Notifications\Notifier;
use Illuminate\Contracts\Events\Dispatcher;
use Flarum\Extend\NotificationType;
class NotificationServiceProvider extends ServiceProvider
{
@@ -19,7 +20,9 @@ class NotificationServiceProvider extends ServiceProvider
$notifier->registerMethod('alert', 'Flarum\Core\Notifications\Senders\NotificationAlerter');
$notifier->registerMethod('email', 'Flarum\Core\Notifications\Senders\NotificationEmailer');
$this->notificationType('Flarum\Core\Notifications\Types\DiscussionRenamedNotification', ['alert' => true]);
$this->extend(
(new NotificationType('Flarum\Core\Notifications\Types\DiscussionRenamedNotification'))->enableByDefault('alert')
);
}
public function register()