Initial xentral_oss_20.3.c9ffacf
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Xentral\Modules\SystemNotification;
|
||||
|
||||
use Xentral\Core\DependencyInjection\ContainerInterface;
|
||||
use Xentral\Modules\SystemNotification\Gateway\NotificationGateway;
|
||||
use Xentral\Modules\SystemNotification\Service\NotificationService;
|
||||
use Xentral\Modules\SystemNotification\Service\NotificationServiceInterface;
|
||||
|
||||
final class Bootstrap
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function registerServices()
|
||||
{
|
||||
return [
|
||||
'NotificationService' => 'onInitNotificationService',
|
||||
'NotificationGateway' => 'onInitNotificationGateway',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function registerJavascript()
|
||||
{
|
||||
$baseDir = './classes/Modules/SystemNotification/www/js/';
|
||||
|
||||
return [
|
||||
'pushjs' => [
|
||||
$baseDir . 'pushjs_1.0.8/push.min.js',
|
||||
$baseDir . 'pushjs.js',
|
||||
],
|
||||
'pushjs_serviceworker.js' => [
|
||||
$baseDir . 'pushjs_1.0.8/serviceWorker.min.js',
|
||||
],
|
||||
'noty' => [
|
||||
$baseDir . 'noty_2.4.1/jquery.noty.packaged.min.js',
|
||||
$baseDir . 'notify.js',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function registerStylesheets()
|
||||
{
|
||||
return [
|
||||
'notification' => [
|
||||
'./classes/Modules/SystemNotification/www/css/notification.css',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ContainerInterface $container
|
||||
*
|
||||
* @return NotificationServiceInterface
|
||||
*/
|
||||
public static function onInitNotificationService(ContainerInterface $container)
|
||||
{
|
||||
return new NotificationService($container->get('Database'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ContainerInterface $container
|
||||
*
|
||||
* @return NotificationGateway
|
||||
*/
|
||||
public static function onInitNotificationGateway(ContainerInterface $container)
|
||||
{
|
||||
return new NotificationGateway($container->get('Database'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user