mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
28 lines
784 B
PHP
28 lines
784 B
PHP
<?php
|
|
|
|
namespace OCA\Signer\AppInfo;
|
|
|
|
use OCA\Files\Event\LoadSidebar;
|
|
use OCA\Signer\Listener\LoadSidebarListener;
|
|
use OCA\Signer\Storage\ClientStorage;
|
|
use OCP\AppFramework\App;
|
|
use OCP\EventDispatcher\IEventDispatcher;
|
|
|
|
class Application extends App
|
|
{
|
|
public const APP_ID = 'signer';
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct(self::APP_ID);
|
|
$container = $this->getContainer();
|
|
$dispatcher = $container->query(IEventDispatcher::class);
|
|
$dispatcher->addServiceListener(LoadSidebar::class, LoadSidebarListener::class);
|
|
|
|
$container->registerService(ClientStorage::class, function ($c) {
|
|
return new ClientStorage(
|
|
$c->query('ServerContainer')->getUserFolder()
|
|
);
|
|
});
|
|
}
|
|
}
|