summaryrefslogtreecommitdiff
path: root/app/ServiceProvider/ClassProvider.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-17 12:30:05 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-17 12:30:05 -0400
commit472f94efee77d8f47ece4ead7d36ee02e5df3e56 (patch)
tree3456ca052db268b1477aa8b9a741d14bb9927515 /app/ServiceProvider/ClassProvider.php
parent3543f45c2d4d6e96e5b88c3168075c0d583fc261 (diff)
Move webhook to project notification type
Diffstat (limited to 'app/ServiceProvider/ClassProvider.php')
-rw-r--r--app/ServiceProvider/ClassProvider.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/app/ServiceProvider/ClassProvider.php b/app/ServiceProvider/ClassProvider.php
index dde3cf10..182ecf26 100644
--- a/app/ServiceProvider/ClassProvider.php
+++ b/app/ServiceProvider/ClassProvider.php
@@ -2,6 +2,9 @@
namespace Kanboard\ServiceProvider;
+use Pimple\Container;
+use Pimple\ServiceProviderInterface;
+use League\HTMLToMarkdown\HtmlConverter;
use Kanboard\Core\Plugin\Loader;
use Kanboard\Core\Mail\Client as EmailClient;
use Kanboard\Core\ObjectStorage\FileStorage;
@@ -9,9 +12,7 @@ use Kanboard\Core\Paginator;
use Kanboard\Core\OAuth2;
use Kanboard\Core\Tool;
use Kanboard\Model\UserNotificationType;
-use Pimple\Container;
-use Pimple\ServiceProviderInterface;
-use League\HTMLToMarkdown\HtmlConverter;
+use Kanboard\Model\ProjectNotificationType;
class ClassProvider implements ServiceProviderInterface
{
@@ -39,6 +40,7 @@ class ClassProvider implements ServiceProviderInterface
'ProjectDailyStats',
'ProjectIntegration',
'ProjectPermission',
+ 'ProjectNotification',
'Subtask',
'SubtaskExport',
'SubtaskTimeTracking',
@@ -65,7 +67,6 @@ class ClassProvider implements ServiceProviderInterface
'UserNotificationType',
'UserNotificationFilter',
'UserUnreadNotification',
- 'Webhook',
),
'Formatter' => array(
'TaskFilterGanttFormatter',
@@ -135,6 +136,12 @@ class ClassProvider implements ServiceProviderInterface
return $type;
};
+ $container['projectNotificationType'] = function ($container) {
+ $type = new ProjectNotificationType($container);
+ $type->setType('webhook', t('Webhook'), '\Kanboard\Notification\Webhook', true);
+ return $type;
+ };
+
$container['pluginLoader'] = new Loader($container);
$container['cspRules'] = array('style-src' => "'self' 'unsafe-inline'", 'img-src' => '* data:');