/**
  * Shuts the kernel down if it was used in the test.
  */
 protected static function ensureKernelShutdown()
 {
     if (null !== static::$application) {
         $container = static::$application->getContainer();
         static::$application->shutdown(static::$application);
         $container->reset();
         static::$application->setContainer($container);
     }
 }
<?php

/**
 * ownCloud - user_permission
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Dino Peng <*****@*****.**>
 * @copyright Dino Peng 2015
 */
namespace OCA\User_Permission\AppInfo;

$app = new Application();
$app->getContainer()->query('UserHooks')->register();
\OCP\Util::addScript('user_permission', 'permission');
\OCP\Util::addStyle('user_permission', "style");
Exemple #3
0
 * @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/>.
 *
 */
namespace OCA\Activity\AppInfo;

$app = new Application();
$c = $app->getContainer();
// add an navigation entry
$navigationEntry = function () use($c) {
    return ['id' => $c->getAppName(), 'order' => 1, 'name' => $c->query('ActivityL10N')->t('Activity'), 'href' => $c->getServer()->getURLGenerator()->linkToRoute('activity.Activities.showList'), 'icon' => $c->getServer()->getURLGenerator()->imagePath('activity', 'activity.svg')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
// register the hooks for filesystem operations. All other events from other apps has to be send via the public api
\OCA\Activity\FilesHooksStatic::register();
\OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\\Activity\\Hooks', 'deleteUser');
\OCA\Activity\Consumer::register($c->getServer()->getActivityManager(), $c);
// Personal settings for notifications and emails
\OCP\App::registerPersonal($c->getAppName(), 'personal');
 public function testGetContainer()
 {
     $this->assertThat($this->object->getContainer(), $this->isInstanceOf('IDependencyInjectionContainer'));
 }
Exemple #5
0
<?php

/**
 * ownCloud - files_mv
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author eotryx <*****@*****.**>
 * @copyright eotryx 2015
 */
namespace OCA\Files_mv\AppInfo;

\OCP\Util::addScript('files_mv', "move");
\OCP\Util::addStyle('files_mv', 'mv');
$app = new Application();
$app->getContainer()->query('FilesHook')->register();
\OCA\Files_mv\HookStatic::register();
\OC::$server->getActivityManager()->registerExtension(function () {
    return new \OCA\Files_mv\Activity(\OC::$server->query('L10NFactory'), \OC::$server->getURLGenerator(), \OC::$server->getActivityManager());
});
Exemple #6
0
<?php

/**
 * ownCloud - registration
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Pellaeon Lin <*****@*****.**>
 * @copyright Pellaeon Lin 2015
 */
namespace OCA\Registration\AppInfo;

$app = new Application();
$controller = $app->getContainer()->query('SettingsController');
return $controller->displayPanel()->render();
<?php

/**
 * ownCloud - user_status_validator
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Dino Peng <*****@*****.**>
 * @copyright Dino Peng 2015
 */
namespace OCA\User_Status_Validator\AppInfo;

$app = new Application();
$app->getContainer()->query('LoginHooks')->register();
<?php

/**
 * @author Björn Schießle <*****@*****.**>
 *
 * @copyright Copyright (c) 2015, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program 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, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
namespace OCA\PopularityContestServer\AppInfo;

$app = new Application();
$app->registerOCSApi();
$container = $app->getContainer();
$container->query('OCP\\INavigationManager')->add(function () use($container) {
    $urlGenerator = $container->query('OCP\\IURLGenerator');
    $l10n = $container->query('OCP\\IL10N');
    return ['id' => 'popularitycontestserver', 'order' => 10, 'href' => $urlGenerator->linkToRoute('popularitycontestserver.page.index'), 'icon' => $urlGenerator->imagePath('popularitycontestserver', 'app.svg'), 'name' => $l10n->t('Popularity Contest')];
});