<?php /** * Copyright (c) 2014 - Arno van Rossum <*****@*****.**> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ OCP\App::checkAppEnabled('ocusagecharts'); OCP\App::setActiveNavigationEntry('ocusagecharts'); OCP\App::addNavigationEntry(array('id' => 'ocusagecharts', 'order' => 60, 'href' => \OCP\Util::linkToRoute('ocusagecharts.chart.frontpage'), 'icon' => OCP\Util::imagePath('ocusagecharts', 'iconchart.png'), 'name' => \OC_L10N::get('ocusagecharts')->t('ocUsageCharts'))); \OCP\Util::addStyle('ocusagecharts', 'style'); \OCP\Backgroundjob::registerJob('OCA\\ocUsageCharts\\Command\\UpdateChartsCommand');
* in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ use OCA\ocUsageCharts\AppInfo\Chart; OCP\App::checkAppEnabled('ocusagecharts'); OCP\App::setActiveNavigationEntry('ocusagecharts'); OCP\App::registerPersonal('ocusagecharts', 'personal'); OCP\App::registerAdmin('ocusagecharts', 'admin'); OCP\App::addNavigationEntry(array('id' => 'ocusagecharts', 'order' => 60, 'href' => \OCP\Util::linkToRoute('ocusagecharts.chart.frontpage'), 'icon' => OCP\Util::imagePath('ocusagecharts', 'iconchart.png'), 'name' => \OC_L10N::get('ocusagecharts')->t('ocUsageCharts'))); \OCP\Util::addStyle('ocusagecharts', 'style'); \OCP\Backgroundjob::registerJob('OCA\\ocUsageCharts\\Job\\UpdateChartsJob'); $app = new Chart(); $x = $app->getContainer()->query('FileHooks'); $x->register(); $useApi = $app->getContainer()->query('ServerContainer')->getConfig()->getAppValue($app->getContainer()->query('AppName'), 'useapi'); if ($useApi) { \OCP\Backgroundjob::registerJob('OCA\\ocUsageCharts\\Job\\UpdateContentStatisticsJob'); }
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ OCP\App::checkAppEnabled('ocusagecharts'); OCP\App::setActiveNavigationEntry('ocusagecharts'); OCP\App::addNavigationEntry(Array( 'id' => 'ocusagecharts', 'order' => 60, 'href' => \OCP\Util::linkToRoute('ocusagecharts.chart.frontpage'), 'icon' => OCP\Util::imagePath('ocusagecharts', 'iconchart.png'), 'name' => \OC_L10N::get('ocusagecharts')->t('ocUsageCharts') )); \OCP\Util::addStyle('ocusagecharts', 'style'); \OCP\Backgroundjob::registerJob('OCA\ocUsageCharts\Command\UpdateUserStorageCommand');
/** * ownCloud - Activity App * * @author Frank Karlitschek * @copyright 2013 Frank Karlitschek frank@owncloud.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ $l = OC_L10N::get('activity'); // add an navigation entry OCP\App::addNavigationEntry(array('id' => 'activity', 'order' => 1, 'href' => OCP\Util::linkToRoute('activity.index'), 'icon' => OCP\Util::imagePath('activity', 'activity.svg'), 'name' => $l->t('Activity'))); // register the hooks for filesystem operations. All other events from other apps has to be send via the public api OCA\Activity\Hooks::register(); // Personal settings for notifications and emails OCP\App::registerPersonal('activity', 'personal'); // Cron job for sending Emails OCP\Backgroundjob::registerJob('OCA\\Activity\\BackgroundJob\\EmailNotification'); \OCP\Backgroundjob::registerJob('OCA\\Activity\\BackgroundJob\\ExpireActivities');
/** * Register a backgroundjob * @param \OC\BackgroundJob\Job|string $job the job instance * @param mixed $argument the argument passed to the run() method of the job * called */ public function registerJob($job, $argument = null) { \OCP\Backgroundjob::registerJob($job, $argument); }
<?php /** * ownCloud - passman * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Sander Brand <*****@*****.**> * @copyright Sander Brand 2014 */ namespace OCA\Passman\AppInfo; \OCP\App::registerAdmin('passman', 'admin-settings'); \OCP\App::addNavigationEntry(array('id' => 'passman', 'order' => 10, 'href' => \OCP\Util::linkToRoute('passman.page.index'), 'icon' => \OCP\Util::imagePath('passman', 'app.png'), 'name' => \OC_L10N::get('Passwords')->t('Passwords'))); \OCP\Backgroundjob::registerJob('OCA\\Passman\\Cron\\RunCron'); \OC::$server->getActivityManager()->registerExtension(function () { return new \OCA\Passman\Activity(); });