Exemplo n.º 1
0
<?php

/**
 * ownCloud - User Files Restore
 *
 * @author Patrick Paysant <*****@*****.**>
 * @copyright 2015 CNRS DSI
 * @license This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
 */
namespace OCA\User_Files_Restore;

use OCA\User_Files_Restore\App\User_Files_Restore;
$app = new User_Files_Restore();
$c = $app->getContainer();
/**
 * add navigation
 */
\OCP\App::addNavigationEntry(array('id' => 'user_files_restore', 'order' => 10, 'href' => \OCP\Util::linkToRoute('user_files_restore.page.index'), 'icon' => \OCP\Util::imagePath($c->query('AppName'), 'restoreApp.svg'), 'name' => $c->query('L10N')->t('Restore')));
/**
 * Load js and overlay icon
 */
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () use($c) {
    \OCP\Util::addscript($c->query('AppName'), 'app');
    \OCP\Util::addscript($c->query('AppName'), 'userfilesrestoretabview');
    \OCP\Util::addscript($c->query('AppName'), 'filesplugin');
    \OCP\Util::addStyle($c->query('AppName'), 'restore');
});
Exemplo n.º 2
0
<?php

/**
 * ownCloud - User Files Restore
 *
 * @author Patrick Paysant <*****@*****.**>
 * @copyright 2014 CNRS DSI
 * @license This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
 */
namespace OCA\User_Files_Restore;

use OCA\User_Files_Restore\App\User_Files_Restore;
$application = new User_Files_Restore();
$application->registerRoutes($this, array('routes' => array(array('name' => 'page#index', 'url' => '/', 'verb' => 'GET'), array('name' => 'request#create', 'url' => '/api/1.0/request', 'verb' => 'POST'), array('name' => 'request#delete', 'url' => '/api/1.0/cancel', 'verb' => 'POST'), array('name' => 'request#versions', 'url' => '/api/1.0/versions', 'verb' => 'GET'))));