2016-09-09 23:36:35 +08:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Nextcloud - passman
|
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later. See the COPYING file.
|
|
|
|
*
|
|
|
|
* @author Sander Brand <brantje@gmail.com>
|
|
|
|
* @copyright Sander Brand 2016
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCA\Passman\AppInfo;
|
|
|
|
|
2016-09-10 00:36:38 +08:00
|
|
|
|
2016-09-10 00:02:53 +08:00
|
|
|
use OCP\Util;
|
2016-09-23 21:05:27 +08:00
|
|
|
use OCP\BackgroundJob;
|
2016-12-30 19:51:32 +08:00
|
|
|
use OCP\App;
|
2016-09-23 21:05:27 +08:00
|
|
|
use OCA\Passman\Notifier;
|
2016-09-23 22:52:41 +08:00
|
|
|
use OCA\Passman\Activity;
|
2016-09-09 23:36:35 +08:00
|
|
|
require_once __DIR__ . '/autoload.php';
|
|
|
|
|
2016-09-10 00:36:38 +08:00
|
|
|
$app = new \OCA\Passman\AppInfo\Application();
|
|
|
|
$app->registerNavigationEntry();
|
|
|
|
$app->registerPersonalPage();
|
2016-09-23 21:05:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
$l = \OC::$server->getL10N('passman');
|
|
|
|
$manager = \OC::$server->getNotificationManager();
|
|
|
|
$manager->registerNotifier(function() {
|
|
|
|
return new Notifier(
|
|
|
|
\OC::$server->getL10NFactory()
|
|
|
|
);
|
|
|
|
}, function() use ($l) {
|
|
|
|
return [
|
|
|
|
'id' => 'passman',
|
|
|
|
'name' => $l->t('Passwords'),
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2016-09-23 22:52:41 +08:00
|
|
|
$manager = \OC::$server->getActivityManager();
|
|
|
|
$manager->registerExtension(function() {
|
|
|
|
return new Activity(
|
2017-02-18 04:25:18 +08:00
|
|
|
\OC::$server->getURLGenerator()
|
2016-09-23 22:52:41 +08:00
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2016-09-10 00:02:53 +08:00
|
|
|
/**
|
|
|
|
* Loading translations
|
|
|
|
*
|
|
|
|
* The string has to match the app's folder name
|
|
|
|
*/
|
2016-09-23 21:05:27 +08:00
|
|
|
Util::addTranslations('passman');
|
2016-12-30 19:51:32 +08:00
|
|
|
\OCP\App::registerAdmin('passman', 'templates/admin.settings');
|