passman/appinfo/app.php

53 lines
1.1 KiB
PHP
Raw Normal View History

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;
use OCP\BackgroundJob;
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();
$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(
\OC::$server->getL10NFactory()
);
});
2016-09-10 00:02:53 +08:00
/**
* Loading translations
*
* The string has to match the app's folder name
*/
Util::addTranslations('passman');
\OCP\BackgroundJob::addRegularTask('\OCA\Passman\Cron\ExpireCredentials', 'run');